diff --git a/server/Bazalt/Auth/Model/User.php b/server/Bazalt/Auth/Model/User.php index 7c118d3..a36bd7a 100755 --- a/server/Bazalt/Auth/Model/User.php +++ b/server/Bazalt/Auth/Model/User.php @@ -276,11 +276,13 @@ public function getPermissions($site = null) } } else { $roles = Role::getGuestRoles(); - $currentRole = \Bazalt\Auth::getCurrentRole(); - if(!$this->isGuest() && $currentRole) { - $roles = [ - $currentRole - ]; + if(!$this->isGuest()) { + $currentRole = \Bazalt\Auth::getCurrentRole(); + if($currentRole) { + $roles = [ + $currentRole + ]; + } } foreach($roles as $role) { $res = $role->getPermissions();