From 26229c110fb92646b36c7b2f48ac7518fd3810a5 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Fri, 17 Mar 2023 02:19:27 +0200 Subject: set algorithns for user authentication and authorization --- core/classes/authentication/User.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'core/classes/authentication/User.php') 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 -- cgit v1.2.3