>From gluon/tools.py
class Auth():
...
def impersonate(self, user_id=DEFAULT):
"""
usage: http://..../impersonate/[user_id]
or: http://..../impersonate/0 to restore
impersonator
requires impersonator is logged in
and
has_permission('impersonate', 'auth_user',
user_id)
"""
...
On Sep 23, 3:07 am, Gary Herron <[email protected]> wrote:
> On 09/22/2010 11:32 PM, Kenneth wrote:> Hello,
>
> > what would be the easiest way of "becoming" another user?
>
> > I have cases where I would like to login in as another user, but to do
> > this I have to know the password. I remember that in Drupal (I think
> > it was) you could as an admin become which ever user you wanted
> > without the password.
>
> > Kenneth
>
> Lookup "impersonate" in web2py.
>
> --
> Gary Herron, PhD.
> Department of Computer Science
> DigiPen Institute of Technology
> (425) 895-4418