Script to check if the current user is impersonating or not in SNOW

var CheckImpersonation = Class.create();
CheckImpersonation.prototype = {
IsImpersonating: function() {
var gi=new GlideImpersonate().isImpersonating();
return gi;
},

type: ‘CheckImpersonation’
};