Let external auth win over session auth and session auth over http auth

refs #9660
This commit is contained in:
Eric Lippmann 2015-07-30 14:50:05 +02:00
parent 9060e8a034
commit feed927fd2

View File

@ -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)