diff options
| author | Igor Scheller <igor.scheller@igorshp.de> | 2019-07-28 15:33:01 +0200 |
|---|---|---|
| committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-07-29 00:58:02 +0200 |
| commit | 62ed77ab25f8f2cf5103caf572079ebc2b50f6bc (patch) | |
| tree | 8bd2e4b7b32a3389ca4e2e4ccbaee1168a2fed67 /src/Helpers/Authenticator.php | |
| parent | bb45d460987032bedca6870df4386cfc4c01800f (diff) | |
Groups: Fix Naming and IDs
Diffstat (limited to 'src/Helpers/Authenticator.php')
| -rw-r--r-- | src/Helpers/Authenticator.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/Helpers/Authenticator.php b/src/Helpers/Authenticator.php index db33339b..a7fbe8c7 100644 --- a/src/Helpers/Authenticator.php +++ b/src/Helpers/Authenticator.php @@ -28,6 +28,9 @@ class Authenticator /** @var int */ protected $passwordAlgorithm = PASSWORD_DEFAULT; + /** @var int */ + protected $guestRole = 10; + /** * @param ServerRequestInterface $request * @param Session $session @@ -119,7 +122,7 @@ class Authenticator } if (empty($this->permissions)) { - $this->permissions = $this->getPermissionsByGroup(-10); + $this->permissions = $this->getPermissionsByGroup($this->guestRole); } } @@ -205,6 +208,22 @@ class Authenticator } /** + * @return int + */ + public function getGuestRole() + { + return $this->guestRole; + } + + /** + * @param int $guestRole + */ + public function setGuestRole(int $guestRole) + { + $this->guestRole = $guestRole; + } + + /** * @param User $user * @return array * @codeCoverageIgnore |
