Name
sn_agent.AccExtSetupUtil
Description
No description available
Script
var AccExtSetupUtil = Class.create();
AccExtSetupUtil.GLOBAL = "global";
// to avoid domain separation issues, determine if the user of the current session can setup
// ACC related extensions on the MID with the given sys_id using ACC provided UI Actions
AccExtSetupUtil.isSetupEnabledForMid = function(midSysId) {
var midGr = new GlideRecord("ecc_agent");
if (!midGr.get(midSysId)) {
gs.error(gs.getMessage("AccExtSetupUtil.isSetupEnabledForMid: no MID Server with sys_id == {0}", midSysId));
return false;
}
var midDomain = midGr.getValue("sys_domain");
var currentUserDomain = new DomainInfo().getCurrentDomain();
return midDomain == AccExtSetupUtil.GLOBAL || currentUserDomain == AccExtSetupUtil.GLOBAL || currentUserDomain == midDomain;
};
AccExtSetupUtil.prototype = {
type: 'AccExtSetupUtil'
};
Sys ID
fc324fa553d1301062d1ddeeff7b128f