summaryrefslogtreecommitdiff
path: root/core/classes/authentication
diff options
context:
space:
mode:
Diffstat (limited to 'core/classes/authentication')
-rw-r--r--core/classes/authentication/User.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/classes/authentication/User.php b/core/classes/authentication/User.php
index 4aef375..cc9d5e3 100644
--- a/core/classes/authentication/User.php
+++ b/core/classes/authentication/User.php
@@ -20,6 +20,9 @@ class User implements UserInterface
// @var array
private $roles = [];
+ // @var array
+ private $privileges = [];
+
// @var bool
private $enabled = true;
@@ -52,6 +55,14 @@ class User implements UserInterface
return $this->roles;
}
+ /** getPrivileges
+ * @return array
+ */
+ public function getPrivileges(): array
+ {
+ return $this->privileges;
+ }
+
/** isEnabled
* @return bool
*/
@@ -98,6 +109,17 @@ class User implements UserInterface
return $this;
}
+ /** setPrivileges()
+ *
+ * @param array $roles
+ * @return User
+ */
+ public function setPrivileges(array $privileges): self
+ {
+ $this->privileges = $privileges;
+ return $this;
+ }
+
/** setEnabled
*
* @param bool $enabled