[web2py] Re: redirecting unauthorized user

2013-09-01 Thread nonni
Sorry for the necro but I just came across this myself and was surprised to see that the otherwise argument only works when the user cannot be authenticated. Any chance on changing this so that the 'otherwise' argument allows you to redirect if 'condition' fails as well? On Wednesday, September

[web2py] Re: redirecting unauthorized user

2012-09-25 Thread Anthony
On Tuesday, September 25, 2012 7:52:48 PM UTC-4, shartha wrote: > > Thanks Anthony, your answer was pretty much what I needed. Ideally though, > it would've been nice to be able to redirect to different pages based on > different decorators. But I think that could be achieved within an if-block

[web2py] Re: redirecting unauthorized user

2012-09-25 Thread shartha
Thanks Anthony, your answer was pretty much what I needed. Ideally though, it would've been nice to be able to redirect to different pages based on different decorators. But I think that could be achieved within an if-block in the controller of the URL you set *auth.settings.on_failed_authorizat

[web2py] Re: redirecting unauthorized user

2012-09-24 Thread Anthony
You can set auth.settings.on_failed_authorization to the URL where you want to redirect. Anthony On Monday, September 24, 2012 10:33:31 PM UTC-4, shartha wrote: > > Is there any way to redirect unauthorized user? > > For instance if the user doesn't have the membership for a particular > group