Another solution would be to use the built-in RBAC to set access;
allotting a group to each user.

Then to provide the same access as that user to another user, simply
add that second user to the first users' group.

Finally for a non-db solution you could just throw information into
the session, so instead of "if auth.user.id==<>" have "if
session.vars.auth_user_id_array[0]==<>"

On Sun, Sep 16, 2012 at 4:05 PM, Martin Weissenboeck <[email protected]> wrote:
> Thank you, I will try it.
> Maybe there is a solution without a db-table?
>
>
> 2012/9/16 Alan Etkin <[email protected]>
>>
>> I'd add a sentry function in the model to record each usage in a table
>>
>> def pseudo_impersonate(impersonate arguments):
>>     db.impersonation.insert(impersonator=auth.user_id)
>>     auth.<impersonate function>(impersonate_arguments)
>>
>>
>> El sábado, 15 de septiembre de 2012 12:46:14 UTC-3, mweissen escribió:
>>>
>>> I have built an application where users can impersonate some others. Now
>>> I want to count the number of persons using this feature, i.e. I want to
>>> count the impersonators. Is there a place for a global variable or a static
>>> variable for an application?
>>>
>>> Regards, Martin
>>
>> --
>>
>
> --
>
>
>

-- 



Reply via email to