mirror of
https://github.com/tchapi/davis.git
synced 2025-04-21 21:11:59 +02:00
Add default auth realm
This commit is contained in:
parent
eca2625d33
commit
43b8287caa
21
README.md
21
README.md
@ -1,13 +1,30 @@
|
||||
Davis
|
||||
---
|
||||
|
||||
A simple admin interface for `sabre/dav` based on Symfony 4.
|
||||
A simple, fully translatable admin interface for `sabre/dav` based on Symfony 4.
|
||||
|
||||
# Requirements
|
||||
|
||||
PHP > 7.1.3
|
||||
|
||||
# Installation
|
||||
|
||||
1. Retrieve the dependencies
|
||||
|
||||
composer install
|
||||
|
||||
2. Migrate the database
|
||||
|
||||
bin/console migrate
|
||||
|
||||
# Development
|
||||
|
||||
If you change or add translations, you need to update the `messages` XLIFF file with :
|
||||
|
||||
bin/console translation:update en --force --domain=messages+intl-icu
|
||||
|
||||
# Libraries used
|
||||
|
||||
- Bootstrap 4 (Licence : MIT)
|
||||
- Bootstrap 4 (Licence : MIT)
|
||||
|
||||
This project does not use any pipeline for the assets since the frontend side is relatively simple, and based on Bootstrap.
|
||||
|
@ -42,7 +42,7 @@ class DAVController extends AbstractController
|
||||
$this->calDAVEnabled = $calDAVEnabled;
|
||||
$this->cardDAVEnabled = $cardDAVEnabled;
|
||||
$this->inviteAddress = $inviteAddress ?? null;
|
||||
$this->authRealm = $authRealm ?? 'SabreDAV';
|
||||
$this->authRealm = $authRealm ?? User::DEFAULT_AUTH_REALM;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,8 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
*/
|
||||
class User
|
||||
{
|
||||
const DEFAULT_AUTH_REALM = 'SabreDAV';
|
||||
|
||||
/**
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue()
|
||||
@ -57,7 +59,9 @@ class User
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function setPassword(string $password): self
|
||||
// $password _can_ be NULL here, in the case when we edit a user
|
||||
// and do not change its password
|
||||
public function setPassword(?string $password): self
|
||||
{
|
||||
$this->password = $password;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user