Hi,
We are looking into System Privileges and wondering what the IMPERSONATE USER privilege does and how to use it.
Using Apps 9 UPD 14.
Many thanks,
Matthew
Hi,
We are looking into System Privileges and wondering what the IMPERSONATE USER privilege does and how to use it.
Using Apps 9 UPD 14.
Many thanks,
Matthew
Best answer by CallumW
Hi
So there are two elements to this - permission sets and profiles.
In order to test out permissions, I simply suggest just having a test user which you can use and change the permissions of as and when you need to. (To copy an existing user’s permission sets)
This way you can copy the users permissions to it and log into the system and have a look to check their permission sets give the correct level of access
The other side is the profile side - You can either copy the users profile to the test user profile or change the profile to the current logged in user (Tools → Options → User Profile Tab → Edit Personal Profiles → Select User and Read Only) to check if they have changed a setting in their profile
Alternatively just maintain another database and then change the user password in that environment and log into that one and test using their account
Impersonate User won’t be useful for what you are trying to do - this is mainly used to post background jobs as a different user or to perform actions as a different user (such as approval routings etc) - impersonate user will not let you log in as that user to “see what the user can see”
But if you still wanted to understand how to use the IMPERSONATE USER privilege, here is some code provided by
begin
Dbms_Output.put_line('Session user: ' || Fnd_Session_API.Get_Fnd_User);
IFSAPP.Fnd_Session_API.Impersonate_Fnd_User('NEW_USER_ID');
Dbms_Output.put_line('Session user changed to: ' || Fnd_Session_API.Get_Fnd_User);
-- run the job
IFSAPP.Fnd_Session_API.Reset_Fnd_User;
Dbms_Output.put_line('Session user reset to: ' || Fnd_Session_API.Get_Fnd_User);
end;
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.