Oops. Forgot to paste my new version of the app_controller: <?php class AppController extends Controller { var $components = array('Auth');
function beforeFilter() { Security::setHash('md5'); $this->Auth->authenticate = ClassRegistry::init('User'); $this->Auth->fields = array( 'username' => 'name', 'password' => 'pass', ); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', 'home'); $this->Auth->allow('*'); $this->Auth->authorize = 'controller'; } function isAuthorized() { return true; } } ?> On Sep 17, 8:40 am, gparra <gpa...@gmail.com> wrote: > Ok so this is odd at the very least, or it just doesn't make sense > according to the documentation. > > My new app_controller has the allow('*') in it. > > Every controller has no beforeFilter() function. except for 2. > > One controller has an empty beforeFilter() function, no > parent::beforeFilter() in it. And it works just as intended! requires > login for every action (even though app_controller says allow('*')) > > The other controller has a beforeFilter() function like this: > function beforeFilter(){ > parent::beforeFilter(); > $this->Auth->allow('index'); > } > And Add and Edit remain broken, every time you click on them it tells > you the controller has been saved. > > All the other controllers without beforeFilter() function remain > broken as well, they don't require login but Add and Edit are still > broken (Lets remember if i take out app_controller everything works > fine, just without login) > > So right now, my solution is to include empty beforeFilter() functions > on every controller and keep my app_controller as listed above? > > Sounds a bit like a waste of code and something that could break in a > future update of Cake. Any ideas? does this sound like a bug or am I > still doing something wrong? > > @Miles J, thanks for the help! I was kind of frustrated and couldn't > even begging to think about how to find working alternatives, with > your suggestion I kind of stumbled upon one, that shouldn't really > work hah. > > Still looking for a 'proper' solution though. Keep the ideas coming. > > On Sep 16, 11:09 pm, Miles J <mileswjohn...@gmail.com> wrote: > > > You don't need your own hashing method if you put: Security::setHash > > ('md5'); That does the same thing as your custom method. > > > What happens when you do allow('*'); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---