Cakephp ACL authentication issue - I'm locked out

Posted by Baseer on Stack Overflow See other posts from Stack Overflow or by Baseer
Published on 2010-03-23T16:36:25Z Indexed on 2010/03/25 11:53 UTC
Read the original article Hit count: 372

Filed under:
|
|
|

I've followed the CakePHP Cookbook ACL tutorial

And as of right now I'm just trying to add users using the scaffolding method. I'm trying to go to /users/add but it always redirects me to the login screen even though I have added $this->Auth->allow('*'); in beforeFilter() temporarily to allow access to all pages. I've done this in both the UsersController and GroupsController as the tutorial asked.

Below is my code for UsersController which I think will be the most relevant of all the files. Let me know if any other piece of code is required.

<?php
class UsersController extends AppController {
 var $name = 'Users';
 var $scaffold;

 function beforeFilter() {
     parent::beforeFilter();
     $this->Auth->allow('*');
 }

 function login() {
    //Auth Magic
 }

 function logout() {
    //Leave empty for now.
 }
} 
?>

I think I've pretty much followed the tutorial, any ideas as to what I may be missing?

Thanks. I've been stuck on this for a while. =(

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about acl