From 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 31 Dec 2014 12:37:15 -0500 Subject: Acl refactoring --- app/Model/Authentication.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'app/Model/Authentication.php') 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']); } -- cgit v1.2.3