[web2py] Re: impersonate: decorators, original user info

2010-03-04 Thread reyelts
The new implementation works fine. Thx! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more op

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread reyelts
Thanks Massimo, I tried your change, but got an error: Traceback (most recent call last): File "gluon/restricted.py", line 173, in restricted File "w:/web2py_win/applications/canyonezt/controllers/ default.py", line 236, in File "gluon/globals.py", line 96, in File "w:\web2py_w

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread mdipierro
Try in trunk auth.requires(...condition..., else_url=URL()) On Mar 1, 3:20 pm, reyelts wrote: > Sorry, "squirrel away" as in how a squirrel saves/hides food for > later. Thanks, the impersonator information was exactly what I was > after. I have a banner at the top of the page that shows the

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread mdipierro
I see the problem. This is a limitation of auth. There should be a way to customize the URL where to be redirected to. I will try add that tonight. Massimo On Mar 1, 3:20 pm, reyelts wrote: > Sorry, "squirrel away" as in how a squirrel saves/hides food for > later. Thanks, the impersonator inf

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread reyelts
Sorry, "squirrel away" as in how a squirrel saves/hides food for later. Thanks, the impersonator information was exactly what I was after. I have a banner at the top of the page that shows the user information, and wanted to also show impersonator information in the case the user is being impersona

[web2py] Re: impersonate: decorators, original user info

2010-03-01 Thread mdipierro
This should do it: @auth.requires(auth.user and auth.has_permission('impersonate',db.auth_user,0)) The arg of requires should be a boolean condition. This would be wrong >@auth.requires(auth.requires_login() and > auth.has_permission('impersonate',db.auth_user,0)) because you have a decora