mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-18 14:00:17 +00:00
Allow authentication to be configured as optional.
This commit is contained in:
parent
85116dc0a4
commit
3acdc1eb7f
@ -126,6 +126,14 @@ class HTTPAuthSession {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($c->allow_unauthenticated) && $c->allow_unauthenticated ) {
|
||||
$this->user_no = -1;
|
||||
$this->username = 'guest';
|
||||
$this->fullname = 'Unauthenticated User';
|
||||
$this->email = 'invalid';
|
||||
return;
|
||||
}
|
||||
|
||||
$this->AuthFailedResponse();
|
||||
// Does not return
|
||||
}
|
||||
@ -272,4 +280,3 @@ class HTTPAuthSession {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user