we want to add a role to "impersonate user" even admins should have this role to impersonate other

v sunil kumar
Kilo Expert

we have to create a role which allows user to impersonate . Even admins should not be allowed to impersonate if they are not having this role. Please let me know if any one has idea on how to implement it. I know that we have a role called impersonator which allows user to impersonate all users except users with admin role and for admins impersonate is default. But we want to allows impersonate if the user is having a specific role even for admins

3 REPLIES 3

Rahul RJ
Giga Sage
Giga Sage

@v sunil kumar Hope below links will help you  

How to limit users in impersonation

Impersonator Role - limiting what users can be impersonated

limit Impersonator 

 

Please mark the suggestion as helpful, if you find it useful to you or others who want to refer to similar content.

 

Regards,

RJ

 

Tony Chatfield1
Kilo Patron

Hi, you could update the script-include 'ImpersonateEvaluator' function canImpersonate() to check if a user has a specific role and always return false if the user does not have your custom role, but I would only consider this if there was a very clear and specific business requirement.

/nav_to.do?uri=sys_script_include.do?sys_id=7d8bd212673202006c45322b43415a18

Hello Tony, I have tried modifying this script but its not working correctly. I have created a role and checked if user has that role return true . But its not working as expected