diff options
Diffstat (limited to 'app/Helper/UserHelper.php')
-rw-r--r-- | app/Helper/UserHelper.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Helper/UserHelper.php b/app/Helper/UserHelper.php index ae3efe1d..ab259a62 100644 --- a/app/Helper/UserHelper.php +++ b/app/Helper/UserHelper.php @@ -107,6 +107,10 @@ class UserHelper extends Base */ public function hasAccess($controller, $action) { + if (! $this->userSession->isLogged()) { + return false; + } + $key = 'app_access:'.$controller.$action; $result = $this->memoryCache->get($key); @@ -128,6 +132,10 @@ class UserHelper extends Base */ public function hasProjectAccess($controller, $action, $project_id) { + if (! $this->userSession->isLogged()) { + return false; + } + if ($this->userSession->isAdmin()) { return true; } |