Saturday, December 4, 2010

Re: Auth loginAction and multiple prefixes

I've had an idea about adding a route using :prefix...haven't experimented yet though.

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
(t) +44 (0) 208 123 3822
(m) +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 4 Dec 2010, at 13:16, cricket wrote:

> On Fri, Dec 3, 2010 at 7:58 AM, Alex Ciobanu <ics.cakephp@gmail.com> wrote:
>> On 12/3/2010 2:41 PM, Jeremy Burns | Class Outfit wrote:
>>>
>>> Yup - I know, but I have multiple prefixes; so if I am diverted from, say,
>>> /managers/shops/edit I would need to have 'managers' => false (and
>>> therefore the 'admin' => false is irrelevant).
>>
>> In my core I have:
>>
>> Configure::write('Routing.prefixes', array('admin', 'user'));
>>
>> and in my beforeFilter:
>>
>> $this->Auth->loginAction = array('user' => false, 'admin' =>
>> false,'controller' => 'users','action' => 'login',);
>>
>> /user/articles/index properly redirects to /users/login if user is not
>> logged in.
>>
>> I'm using 1.3.5 btw.
>>
>
> This is something I've noticed before and it seems less than ideal to
> me that we need to list all of our prefixes like that. Perhaps it
> would be better if Router::url() could parse for 'prefix' => false, as
> well, for the case where none of the prefixes should be used.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: