From 775f8cced63b8ac88c74740a61d249d5290a86ad Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 30 Jul 2015 09:31:58 +0200 Subject: [PATCH] lib: Introduce User::$isHttpUser refs #9660 --- library/Icinga/User.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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 *