Re: Yet another Auth and ACL question

2008-02-01 Thread djiize

it seems to be the correct behavior:
- if you're not logged in, it redirectts you to login page
- if you're logged, it checks if you're allowed to access to
controller:
  * if yes, ok
  * if not, it redirects you back and tell you access denied
Why do you want to be redirected to login since you're already logged
in?
It's up to you to add this: if I don't have access to a controller,
give the choice to be logged in with another account (like a Linux
sudo or Vista UAC). IMHO it's not a very common need.

On 1 fév, 07:09, chad [EMAIL PROTECTED] wrote:
 Braindead - I'm wondering the same thing.  Right now, as you said, it
 just redirects you to the current page. Perhaps an enhancement ticket
 at trac?

 On Jan 29, 12:51 pm, Braindead [EMAIL PROTECTED] wrote:

  That's what I already did. When I'm not logged in and want to enter an
  access controlled controller, I'm redirected to $loginAction.
  But how is it possible to be redirected to $loginAction, when I'm
  already logged in, but not allowed to access a controller?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another Auth and ACL question

2008-02-01 Thread Braindead

I think it is not right to be redirected to the referer page and
display the error message on the referer page. This is not what I
would expect when I try to access a certan page.
At first I wanted to be redirected to the login page, because I though
it is the right behavior to give the user the chance to login as
another user.
Now I changed my mind and hacked the auth.php so that it now splashes
the error message to the user (using $controller-flash), waits for 5
seconds and the redirects to the referer page. I think this is the way
for me to go.

Thanks for you help.

Markus


On Feb 1, 9:43 am, djiize [EMAIL PROTECTED] wrote:
 Why do you want to be redirected to login since you're already logged
 in?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another Auth and ACL question

2008-01-31 Thread chad

Braindead - I'm wondering the same thing.  Right now, as you said, it
just redirects you to the current page. Perhaps an enhancement ticket
at trac?

On Jan 29, 12:51 pm, Braindead [EMAIL PROTECTED] wrote:
 That's what I already did. When I'm not logged in and want to enter an
 access controlled controller, I'm redirected to $loginAction.
 But how is it possible to be redirected to $loginAction, when I'm
 already logged in, but not allowed to access a controller?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another Auth and ACL question

2008-01-29 Thread Braindead

That's what I already did. When I'm not logged in and want to enter an
access controlled controller, I'm redirected to $loginAction.
But how is it possible to be redirected to $loginAction, when I'm
already logged in, but not allowed to access a controller?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Yet another Auth and ACL question

2008-01-29 Thread Matias Lespiau
Maybe the Auth $loginAction property is what you're looking for. Set the url
of the controller that handles login (As a string or array).

Cheers,

-- 
Matias Lespiau
http://www.gignus.com/



On Jan 29, 2008 4:10 PM, Braindead [EMAIL PROTECTED] wrote:


 Hello group,

 I'm using Auth and ACL in Cake 1.2. It took quite a long time to get
 it to work, but now everything is working, except one thing:

 When I'm logged in and try to access a controller I don't have access
 to, I'm redirected to the url I came from and get the message that I'm
 not allowed to access the controller. I would expect to be redirected
 to the login page and see the error message.

 Is there a way to achieve this or is this a normal Cake behavior?

 Happy baking
 Markus


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---