Name
sn_cmdb_ci_class.OTAssetFilterAjax
Description
A utility client script to filter OT Assets based on ISA Entity site.
Script
var OTAssetFilterAjax = Class.create();
OTAssetFilterAjax.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
// [Important] Read before using this file
// Everything in this utility file is deprecated and no longer used by OT Products after Feb 2023
// Reason that we are keeping this file is to support new CMDB CI Class Model + old OT Plugins
// If getUserSites is needed, please use the one in sn_isa_model.ISAEntitySiteUser
// If ISA plugin may not be loaded, please do a plugin check
INVALID_SYS_ID: "invalidSysId",
getUserSites: function() {
if (!GlidePluginManager.isActive('com.sn_isa_model')) {
return "";
}
var sites = new sn_isa_model.ISAEntitySiteUser().getUserSites(gs.getUserID() + '');
return Array.isArray(sites) ? sites : "";
},
otAdminCheck: function() {
if (gs.hasRole('cmdb_ot_admin'))
return "";
return this.INVALID_SYS_ID;
},
type: 'OTAssetFilterAjax'
});
Sys ID
ccb1e5eb53500110d848ddeeff7b12fb