You should have both: @auth.requires_login() @auth.requires_permission(request.function)
the latter implies the former On Friday, 14 February 2014 04:27:31 UTC-6, ajith c t wrote: > > Hi I updated web2py 2.5 to 2.8, > > now the login and logout seems to work but with a problem, > > the login page redirects to errorpage and logout correctly redirects to > login page. > But my logs are: > > ******************************************************************* > 2014-02-14 10:18:45,224 - DEBUG - web2py.scheduler.ip-10-0-0-175#25487 - > defining tables (migrate=True) > 2014-02-14 10:18:45,274 - DEBUG - app - login page > 2014-02-14 10:18:45,315 - ERROR - app - Traceback (most recent call last): > File "/srv/trustvouch-fe/applications/app/controllers/default.py", line > 25, in login > form = auth.login() > File "/srv/trustvouch-fe/gluon/tools.py", line 2393, in login > redirect(next, client_side=settings.client_side) > File "/srv/trustvouch-fe/gluon/http.py", line 147, in redirect > Location=loc) > HTTP: 303 SEE OTHER > > 2014-02-14 10:18:45,515 - DEBUG - web2py.scheduler.ip-10-0-0-175#25487 - > defining tables (migrate=True) > > ******************************************************************** > 2014-02-14 10:19:08,879 - DEBUG - web2py.scheduler.ip-10-0-0-175#25487 - > defining tables (migrate=True) > 2014-02-14 10:19:08,932 - DEBUG - app - logout > 2014-02-14 10:19:08,934 - ERROR - app - Traceback (most recent call last): > File "/srv/trustvouch-fe/applications/app/controllers/default.py", line > 38, in logout > auth.logout(next=URL(r=request, c='default', f='index')) > File "/srv/trustvouch-fe/gluon/tools.py", line 2434, in logout > redirect(next) > File "/srv/trustvouch-fe/gluon/http.py", line 147, in redirect > Location=loc) > HTTP: 303 SEE OTHER > > > both of them shows http 303 error, seems both have tools.py error, what am > I doing wrong. > Can anyone help me here, because I need to push live data to my app very > soon > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.