lib: Introduce User::$isHttpUser

refs #9660
This commit is contained in:
Eric Lippmann 2015-07-30 09:31:58 +02:00
parent cf8c680482
commit 775f8cced6
1 changed files with 30 additions and 0 deletions

View File

@ -96,6 +96,13 @@ class User
*/
protected $preferences;
/**
* Whether the user is authenticated using a HTTP authentication mechanism
*
* @var bool
*/
protected $isHttpUser = false;
/**
* Creates a user object given the provided information
*
@ -410,6 +417,29 @@ class User
return ! empty($this->externalUserInformation);
}
/**
* Get whether the user is authenticated using a HTTP authentication mechanism
*
* @return bool
*/
public function getIsHttpUser()
{
return $this->isHttpUser;
}
/**
* Set whether the user is authenticated using a HTTP authentication mechanism
*
* @param bool $isHttpUser
*
* @return $this
*/
public function setIsHttpUser($isHttpUser = true)
{
$this->isHttpUser = (bool) $isHttpUser;
return $this;
}
/**
* Whether the user has a given permission
*