diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-31 12:37:15 -0500 |
commit | 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 (patch) | |
tree | 782a414d15f9091d04bcf3960a957f952958e548 /app/Model/Authentication.php | |
parent | 66f150d887a34d2b51ff14f22d0fd41a34f8cc77 (diff) |
Acl refactoring
Diffstat (limited to 'app/Model/Authentication.php')
-rw-r--r-- | app/Model/Authentication.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/Model/Authentication.php b/app/Model/Authentication.php index 87493c88..f917bff4 100644 --- a/app/Model/Authentication.php +++ b/app/Model/Authentication.php @@ -41,13 +41,8 @@ class Authentication extends Base */ public function isAuthenticated($controller, $action) { - // If the action is public we don't need to do any checks - if ($this->acl->isPublicAction($controller, $action)) { - return true; - } - // If the user is already logged it's ok - if ($this->acl->isLogged()) { + if ($this->userSession->isLogged()) { // We update each time the RememberMe cookie tokens if ($this->backend('rememberMe')->hasCookie()) { @@ -117,7 +112,7 @@ class Authentication extends Base if (! empty($values['remember_me'])) { $credentials = $this->backend('rememberMe') - ->create($this->acl->getUserId(), Request::getIpAddress(), Request::getUserAgent()); + ->create($this->userSession->getId(), Request::getIpAddress(), Request::getUserAgent()); $this->backend('rememberMe')->writeCookie($credentials['token'], $credentials['sequence'], $credentials['expiration']); } |