mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Let external auth win over session auth and session auth over http auth
refs #9660
This commit is contained in:
parent
9060e8a034
commit
feed927fd2
@ -87,14 +87,13 @@ class Auth
|
|||||||
*/
|
*/
|
||||||
public function isAuthenticated($ignoreSession = false)
|
public function isAuthenticated($ignoreSession = false)
|
||||||
{
|
{
|
||||||
if ($this->user === null
|
if ($this->user === null && ! $ignoreSession) {
|
||||||
&& ! $this->authHttp()
|
|
||||||
&& ! $this->authExternal()
|
|
||||||
&& ! $ignoreSession
|
|
||||||
) {
|
|
||||||
$this->authenticateFromSession();
|
$this->authenticateFromSession();
|
||||||
}
|
}
|
||||||
return $this->user !== null;
|
if ($this->user === null && ! $this->authExternal()) {
|
||||||
|
return $this->authHttp();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAuthenticated(User $user, $persist = true)
|
public function setAuthenticated(User $user, $persist = true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user