Hi,

Auth component uses 'loginRedirect' (by default, /users/login or
/admin/users/login) class property for redirecting non-logged in users to
login page if you are on restricted page.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Wed, Nov 17, 2010 at 12:56 AM, danielnolan <danielano...@gmail.com>wrote:

> I am not sure that is one hundred percent accurate, if I am logged in
> as an admin and i type a restricted URL in the address bar of the
> browser I get redirected to the main site home page. If i am not
> logged in and I type the same restricted URL in the address bar of the
> browser i get redirected to the admin/login page and I get a flash
> message saying that I am not authorized to access that location.
>
> So how does the app know to redirect me to the admin/login page when
> not logged in, but when logged in I get redirected to the main site
> home page?
>
> On Nov 16, 12:08 am, Amit Badkas <amit.sanis...@gmail.com> wrote:
> > Hi,
> >
> > The redirection after ACL fails depends on HTTP_REFERER environment
> > variable. If you access the restricted URL directly then referrer doesn't
> > get set, that's why '/' (by default, home page) is being used.
> >
> > Amit Badkas
> >
> > PHP Applications for E-Biz:http://www.sanisoft.com
> >
> > On Mon, Nov 15, 2010 at 10:06 PM, danielnolan <danielano...@gmail.com
> >wrote:
> >
> > > I have an application setup with admin prefix route, Auth, and ACL.
> > > everything seems to be working as expected, except when I am logged in
> > > as an admin user and I try to access a ACL restriced action by typing
> > > the url in the address bar of the browser. I get redirected to the
> > > home page of the site (view/pages/home.ctp) instead of the admin
> > > dashboard (users/admin_dashboard) i have created.
> >
> > > If I click on a link to the exact same action in the admin dashboard
> > > that is restricted, I get redirected to the admin dashboard as
> > > expected with an auth error message telling me I am not authorized to
> > > access that location.
> >
> > > What am I missing?
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> <cake-php%2bunsubscr...@googlegroups.com<cake-php%252bunsubscr...@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+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to