We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to restrict admin users impersonating System Admin

samadam
Mega Sage

I have admin users who impersonate System Admin which is making hard to track who is making the changes. How can I restrict Admin Users impersonating System Admin user?

5 REPLIES 5

hvrdhn88
Giga Patron

OOTB script include "ImpersonateEvaluator" which cater the impersonation functionality. you just need to make some modification there.

 

i tried on PDI environment and restrict it by passing the "System Admin" sysid in if condition. if i am an admin and i try to impersonate the "System Admin" it will restrict me to do that.

 

eg:

 

var ImpersonateEvaluator = Class.create();
ImpersonateEvaluator.prototype = {
	initialize: function() {},
		type: 'ImpersonateEvaluator',
		canImpersonate: function(currentUser, impersonatedUser) {
			var userImpersonated = impersonatedUser.getID();
			
			if(userImpersonated == '6816f79cc0a8016401c5a33be04be441')
				
			{
				
				return false;
				
			}
			
			else
				
			{
				
				return true;
				
			}
		}
	};

 

find_real_file.png

We have a requirement to allow users to search using email_id in the impersoantion dialog window.
Any input on this would be much appreciated

Devyani_6
Mega Guru

Hi Samadam,

Refer below links.

Prevent impersonating

Restrict a Particular User From Appearing in the Impersonation List

Mark If Correct/Helpful.

Regards,
Devyani

Hi Devyani, 

Is it possible to enable search using email_id in the impersoantor window?