This topic is locked

Impersonate AD user

8/22/2013 3:21:24 PM
ASPRunnerPro General questions
T
Tim author

Hello,
In previous versions of ASPR, before AD integration, I used to create a "testing" table with one field called "impersonate". I stored all users in a "users" table. I could edit the record in the testing table, select a user (lookup to the users table) and on save I would set Session("UserID") to the user (as well as other table specific rights and such). It was incredibly helpful to be able to see the applications as other users would see it - with there rights - without having to have their password and actually logon as them.
So now I use AD integration with IIS auto logon (which I love!) and I'm wondering if I can achieve the same thing. I am able to select the user I want to impersonate via a lookup to a users table (I have the windows logon names in this table), and I can set the Session("UserID"), Session("UserName"), and Session("AccessLevel") = ACCESS_LEVEL_USER variables, but it doesn't set their rights per table. When I turn debug mode on it looks like this is the code I need to affect:
select [GroupID] from [XX_uggroups] where [Label] in (list of groups user belongs to)
Am I correct in thinking that if I can change that list of groups to be the list the impersonated user belongs to that the applications rights would be set correctly? Is there a way for me to do this? Or is there a different, better approach for me to impersonate different users?
I hope this makes sense. Let me know if you have questions.
Thanks in advance for looking at this.

Tim

T
Tim author 9/2/2013

No go?

admin 9/5/2013

While I don't understand the whole question here are a couple of pointers.
User impersonation in general:

http://xlinesoft.com/asprunnerpro/docs/implementing_single_sign_on_feature.htm
To fine tune permissions use table event "Get Table Permissions"