Re: ACL not denying access to protected actions
Like a charm! Added parent::beforeFilter(); to all my controllers and it works as expected. Thanks a lot. On 7 Aug, 20:12, Josh wrote: > My problem was that I had removed the parent::beforeFilter(); > statement from my controllers. It seems like the section of the > Cookbook where it says to insert this line might lead you to believe > that you only need it when using $this->Auth->allowedActions. In fact, > this is the only way to assure that the beforeFilter method in > app_controller runs and configures theACL. > > Let me know if this works. > > On Aug 7, 2:46 pm, robh wrote: > > > Hi, > > > (Sorry, meant to reply to the group) > > > Have you had any joy with this issue? I am struggling with exactly the > > same problem you have described. > > > Cheers > > > On Aug 3, 5:53 am, Josh wrote: > > > > Hello, > > > > I have been working on an app for quite a while now, and I have just > > > noticed that myACLdoesn't seem to be doing anything: once logged in, > > > allactionsare allowed. I have checked through theACLtutorial in > > > the manual a few times and even removed and replaced the code > > > snippets. I havenothad this trouble with the CakeACLon other > > > sites, so I'm getting pretty frustrated. Here are some more details: > > > > -TheACLand Auth component are placed in the App Controller and are > > > definitely being instantiated > > > > -The DBs for theACLare all correct and up to date > > > > -TheAcl->check function always returns the correct permission status > > > for both the group and the user > > > > loginRedirect and actionPath are set to what I'd like them to be > > > > -There are no stray allowedActions or allow statements > > > > In short, theACLcomponent has a correct record of Aros/Acos and > > > Permissions. It just doesn't denyaccessto any logged in user. Does > > > anybody know what can be causing this? I have a feeling that when it > > > is fixed, I'll want to kick myself, but I have been struggling with it > > > long enough that I'd be happy with a DUH! moment. > > > > Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ACL not denying access to protected actions
Hi, (Sorry, meant to reply to the group) Have you had any joy with this issue? I am struggling with exactly the same problem you have described. Cheers On Aug 3, 5:53 am, Josh wrote: > Hello, > > I have been working on an app for quite a while now, and I have just > noticed that myACLdoesn't seem to be doing anything: once logged in, > all actions are allowed. I have checked through theACLtutorial in > the manual a few times and even removed and replaced the code > snippets. I have not had this trouble with the CakeACLon other > sites, so I'm getting pretty frustrated. Here are some more details: > > -TheACLand Auth component are placed in the App Controller and are > definitely being instantiated > > -The DBs for theACLare all correct and up to date > > -TheAcl->check function always returns the correct permission status > for both the group and the user > > loginRedirect and actionPath are set to what I'd like them to be > > -There are no stray allowedActions or allow statements > > In short, theACLcomponent has a correct record of Aros/Acos and > Permissions. It just doesn't deny access to any logged in user. Does > anybody know what can be causing this? I have a feeling that when it > is fixed, I'll want to kick myself, but I have been struggling with it > long enough that I'd be happy with a DUH! moment. > > Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Missing Method in UsersController
Cool. I thought URLs should map to the view name ie. users/view_list, but if they map to the controller action then it works for me. I'm still getting my head around the naming conventions - takes a bit of getting used to. Thanks On Aug 7, 2:50 pm, Jamie wrote: > Are you going to the URL "/users/viewList" or "/users/view_list"? > > Basically, given these conditions: > > - controller action is 'Users::ViewList()' > - view file is 'view_list.ctp' > > the URL will be: users/viewList > > The code engine will look for the view file in underscored form, but > the resulting URL will still follow the form of the action name. > > - Jamie > > On Aug 7, 5:36 am, robh wrote: > > > Hi Vijay, > > > Thanks for your reply. Are you suggesting I use "function viewlist()" > > in my controller? > > > I was following the convention > > at:http://book.cakephp.org/view/26/View-Conventions > > > or more specifically: > > "View template files are named after the controller functions they > > display, in an underscored form. The getReady() function of the > > PeopleController class will look for a view template in /app/views/ > > people/get_ready.ctp." > > > This is not working, as described in my original post. > > > I have reverted to naming my actions "function get_ready()" which > > works for me, but was wondering if there could be a reason why cake is > > not picking up the views as described in conventions. > > > Cheers > > Rob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Missing Method in UsersController
Hi Vijay, Thanks for your reply. Are you suggesting I use "function viewlist()" in my controller? I was following the convention at: http://book.cakephp.org/view/26/View-Conventions or more specifically: "View template files are named after the controller functions they display, in an underscored form. The getReady() function of the PeopleController class will look for a view template in /app/views/ people/get_ready.ctp." This is not working, as described in my original post. I have reverted to naming my actions "function get_ready()" which works for me, but was wondering if there could be a reason why cake is not picking up the views as described in conventions. Cheers Rob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Missing Method in UsersController
Hi, I'm new to CakePHP and I've run into a problem I can't figure out. I've created an action called 'viewList()' in UsersController, and a view called view_list.ctp. When I try and access ../users/view_list I get the following error: Error: The action view_list is not defined in controller UsersController Error: Create UsersController::view_list() in file: app\controllers \users_controller.php. I thought that the convention was to create camelcased actions and underscored views? Do I need to configure something? Thanks Rob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---