<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2022-07-04 05:59:42">
<sys_ui_action action="INSERT_OR_UPDATE">
<action_name>u_fpc_impersonate_this_user</action_name>
<active>true</active>
<client>true</client>
<client_script_v2><![CDATA[function onClick(g_form) {

}]]></client_script_v2>
<comments>Written by Jim Coyne
https://community.servicenow.com/community?id=community_user_profile&amp;user=8352da29dbd81fc09c9ffb651f9619c7
https://community.servicenow.com/community?id=community_blog&amp;sys_id=d3e67ca4dba45190be625ac2ca961902

Allows users with the "impersonator" Role to impersonate the currently displayed user.

Originally based on a ServiceNowGuru.com article - http://www.servicenowguru.com/system-ui/ui-actions-system-ui/direct-impersonation-user-record</comments>
<condition>current.getValue("sys_id") != gs.getUserID() &amp;&amp; gs.hasRole("impersonator") &amp;&amp; current.active == true &amp;&amp; current.locked_out == false</condition>
<form_action>true</form_action>
<form_button>false</form_button>
<form_button_v2>false</form_button_v2>
<form_context_menu>false</form_context_menu>
<form_link>true</form_link>
<form_menu_button_v2>false</form_menu_button_v2>
<form_style/>
<format_for_configurable_workspace>false</format_for_configurable_workspace>
<hint>Users with the "impersonator" Role can impersonate this User</hint>
<isolate_script>false</isolate_script>
<list_action>true</list_action>
<list_banner_button>false</list_banner_button>
<list_button>false</list_button>
<list_choice>false</list_choice>
<list_context_menu>true</list_context_menu>
<list_link>false</list_link>
<list_save_with_form_button>false</list_save_with_form_button>
<list_style/>
<messages>u_fpc_impersonate_this_user.modal.title</messages>
<name>Impersonate this User</name>
<onclick>uFpcImpersonateThisUser();</onclick>
<order>200000</order>
<script><![CDATA[function uFpcImpersonateThisUser() {
	var sysId = "";

	//is this from a list or form view?
	try {
		sysId = g_sysId;  //user selected the List context menu
	} catch(err) {
		//must be a form view
		sysId = g_form.getUniqueValue();
	}

	if (sysId) {
		var modalWindow = new GlideModal("u_fpc_impersonate_this_user");
		modalWindow.setBackdropStatic(true);  //remain open when user clicks outside of the window
		modalWindow.setTitle(getMessage("u_fpc_impersonate_this_user.modal.title"));
		modalWindow.setWidth(400);
		modalWindow.setPreference("sysparm_id", encodeURIComponent(sysId));
		modalWindow.render();
	}
}]]></script>
<show_insert>false</show_insert>
<show_multiple_update>false</show_multiple_update>
<show_query>false</show_query>
<show_update>true</show_update>
<sys_class_name>sys_ui_action</sys_class_name>
<sys_created_by>$jcoyne</sys_created_by>
<sys_created_on>2014-01-01 05:00:00</sys_created_on>
<sys_domain>global</sys_domain>
<sys_domain_path>/</sys_domain_path>
<sys_id>f6b470439d16b400233ce0e2393336af</sys_id>
<sys_mod_count>8</sys_mod_count>
<sys_name>Impersonate this User</sys_name>
<sys_overrides display_value=""/>
<sys_package display_value="Global" source="global">global</sys_package>
<sys_policy/>
<sys_scope display_value="Global">global</sys_scope>
<sys_update_name>sys_ui_action_f6b470439d16b400233ce0e2393336af</sys_update_name>
<sys_updated_by>$jcoyne</sys_updated_by>
<sys_updated_on>2022-07-04 05:43:23</sys_updated_on>
<table>sys_user</table>
<ui11_compatible>false</ui11_compatible>
<ui16_compatible>false</ui16_compatible>
</sys_ui_action>
</unload>
