Re: A little help with auth. :)

2010-10-20 Thread Miles J
Just check $this-params['action'] and do different logic based on specific actions. On Oct 19, 7:12 pm, xtraorange xtraora...@gmail.com wrote: Is there any way to do that at the action level, rather than the controller level?  Different actions may have different userlevel requirements. On

Re: A little help with auth. :)

2010-10-20 Thread jsalonen
yes, that's what i was meaning to imply with $requiredLevel = xxx($this-action); $this-action gives you the name of the current action. Replace xxx with an array access or a function/method call that returns the required access level for the given action. On Oct 20, 4:12 am, xtraorange

A little help with auth. :)

2010-10-19 Thread xtraorange
Howdy all, ACL seems to just be too complicated for what I'm doing, particularly with all the actions I have... the table is hard to keep organized, and it's way too hard to edit permissions. So I'm looking for something else. The site I'm building has need for multiple user levels, but the

Re: A little help with auth. :)

2010-10-19 Thread jsalonen
The easiest way to do it is probably simpler than you think: set the $authorize variable of AuthComponent to controller, and add isAuthorized method to your controllers, kind of like: function beforeFilter() { $this-Auth-authorize = 'controller'; } function isAuthorized() { // get access

Re: A little help with auth. :)

2010-10-19 Thread xtraorange
Is there any way to do that at the action level, rather than the controller level? Different actions may have different userlevel requirements. On Oct 19, 7:18 pm, jsalonen joni.salo...@gmail.com wrote: The easiest way to do it is probably simpler than you think: set the $authorize variable of