Trigger an impersonation start event

Community Alums
Not applicable
Can we trigger an impersonation start event when a particular group user is impersonated?
17 REPLIES 17

XvE
Tera Contributor

I see a lot of people trying to run business rules off of the created event, but nobody seems to mention the ImpersonateEvaluator Script Include.

 

Depending on why you would want to send a notification, you can generate your own event in the ImpersonateEvaluator SI, or even return false if they shouldnt be allowed to impersonate that user.

 

The advantage I see in doing it this way, is you don't have to have a business rule be skipped for thousands upon thousands of events, but simply run the code when someone impersonates them.

With the big downside that you are changing a script include which causes technical debt and possible issues on every patch/upgrade of the system.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

XvE
Tera Contributor

This feels like you haven't actually checked the ImpersonateEvaluator script include.

 

It has one function and all it does is return true:

 

var ImpersonateEvaluator = Class.create();
ImpersonateEvaluator.prototype = {
    initialize: function() {},
    type: 'ImpersonateEvaluator',
    canImpersonate: function(currentUser, impersonatedUser) {
        return true;
    }

 

This script include is meant to be edited so that you can customize who can impersonate when.