Comments on: Single Click Impersonation Return https://servicenowguru.com/system-definition/single-click-impersonation-return/ ServiceNow Consulting Scripting Administration Development Thu, 07 Mar 2024 20:14:34 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Christina Peters https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8812 Fri, 11 Dec 2015 08:29:54 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8812 In reply to Mark Stanger.

Thank you Mark for your answer.
I raised an enhancement request. But it would be great if some others could also raise one. Because my other enhancement requests are open now for over a year and nothing happens.

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8811 Wed, 09 Dec 2015 16:01:56 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8811 In reply to Christina Peters.

I’ve looked at this and unfortunately ServiceNow has removed any of the hooks that allowed us to do this. If you want to see this in Geneva and onwards I suggest you contact ServiceNow and log an enhancement request.

]]>
By: Christina Peters https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8810 Wed, 09 Dec 2015 12:53:57 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8810 Has anybody tried to add this to the new UI16 in Geneva?

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8809 Tue, 21 Apr 2015 12:05:30 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8809 In reply to Chris Murphy.

Hey Chris, it was good seeing you at K15! I looked into this some more this morning and I’m able to get the icon to show consistently in the ESS. Unfortunately, ServiceNow gives us absolutely no way of knowing in the ESS whether a user is being impersonated or not. Because of that, it will show for ALL users rather than just admins or the user impersonating and there’s no way to get back to the impersonating user because the ESS doesn’t store it anywhere. Unfortunately, I don’t see any way around this other than what you’re doing already.

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8808 Mon, 23 Mar 2015 19:36:21 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8808 In reply to Brandon Grimes.

Nice. Thanks for sharing Brandon!

]]>
By: Brandon Grimes https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8807 Mon, 23 Mar 2015 19:32:24 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8807 Hey Mark,

I noticed that this breaks for me on Fuji. I’ve attempted to adjust the code for a ‘Fuji Friendly’ version.

addLoadEvent(addUnimpersonateButton);

function addUnimpersonateButton(){
	try{
		//Show un-impersonate icon if a user is being impersonated
		if($('impersonating_toggle_id').value != ''){
			//create html string
			var htmlString = '<span id="unimpersonate_span" style="visibility:visible; display:inline-block; zoom:1; vertical-align:middle;"><span data-placement="bottom" data-container="body" tabindex="0" class="icon-power sn-tooltip-basic" style="cursor:pointer; font-size:20px;" title="End impersonation" onclick="unimpersonateMe();"><span class="sr-only">End impersonation</span></span>'
			//Insert the clickable icon in the dom
			$('impersonate_span').insert({
				after: htmlString
			});
		}
	}catch(e){}
}

function unimpersonateMe(){
	//Return the user to their original session
	top.location.href = 'ui_page_process.do?sys_id=b071b5dc0a0a0a7900846d21db8e4db6&sys_user='+ $('impersonating_toggle_id').value;
}
]]>
By: Chris Murphy https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8806 Tue, 13 Jan 2015 17:18:17 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8806 This is amazing! I love it and it works so well. I have a question for you though. Is there any way to have this added to a fully customized ESS page? Our non-ITIL users don’t have access to the menu bar where this button resides. When we impersonate them, we have to log out and back in to end the impersonation. It would be nice to have it appear in the custom header we created.

]]>
By: Mark Stanger https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8805 Mon, 15 Sep 2014 15:35:15 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8805 In reply to Andreas.

Thanks Andreas! This is a good change, and one that I think I’ll incorporate into the code in the article once we get more people on the Eureka instance. One note about translation (gs.getMessage) though, is that I don’t think that will work because this is a UI script rather than a jelly-based UI macro or UI page.

]]>
By: Andreas https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8804 Mon, 15 Sep 2014 14:57:50 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8804 Hi,

since UI14 the stoip-sign-icon does no longer match the UI.
This little tweak uses the “power”-icon and allows for translation of “End impersonation”. Simply replace the content of line 9 in the script with the following:

after: '<span id="unimpersonate_span"><span class="icon-power" style="cursor:pointer;cursor:hand; font-size: 22px;" title="${gs.getMessage('End impersonation')}" onclick="unimpersonateMe();" /></span>'
]]>
By: Tim Black https://servicenowguru.com/system-definition/single-click-impersonation-return/#comment-8803 Tue, 25 Feb 2014 21:13:01 +0000 https://servicenowguru.wpengine.com/?p=3908#comment-8803 It’s the little things that matter. This feature is priceless!

]]>