Geneva/UI16: Client side check for impersonation

Chris M3
Tera Guru

Has anyone figured out something you can look at on the client side to see if you are impersonating a user?

Previously we used a UI script to look for a particular element, and then made a modification to the DOM to alert the user that they are impersonating.   Now looking at the DOM, I don't see any differences that indicate I am impersonating.

I have also tried using an Ajax call, but I'm getting GlideAjax is not defined

Also getting g_user is not defined

7 REPLIES 7

Sounds great, you should share it on share.servicenow.com.


ChrisRoyer
Kilo Guru

I know this thread is a little dated, but y'all inspired me to make this Unimpersonate UI16



edit: The link doesn't seem to be working directly from the community ServiceNow Share   https://share.servicenow.com/app.do#/detailV2/7f12cd65137f12404e8cd4a76144b022/overview Yet copy pasting incognito mode loaded it for me, anyway. If they still don't work it should be searchable on share as unimpersonate ui16


James_Neale
Mega Guru

An unimpersonate patch is now built into the UI16 Developer Patch. It adds an 'Unimpersonate' link underneath the 'Impersonate User' option when you are impersonating someone. It only shows if you are impersonating someone (but can be made permanent).


User Profile Menu


ServiceNow Share



Contribution welcome over at GitHub.


GitHub - sn-developer/UI16-Developer-Patch: Patches for ServiceNow UI16 interface.



Cheers,


James