diff --git a/library/Icinga/User.php b/library/Icinga/User.php index d936eca58..31bb8812e 100644 --- a/library/Icinga/User.php +++ b/library/Icinga/User.php @@ -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 *