Name
global.PrivacyUtil
Description
Data Privacy Utility Methods
Script
var PrivacyUtil = Class.create();
PrivacyUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
/**
* Return true if and only if current user session can access a privacyConfig
*/
isAccessiblePrivacyConfiguration: function(privacyConfig) {
gs.log('PrivacyUtil.isAccessiblePrivacyConfiguration has been deprecated');
},
sessionHasRole: function(role) {
if (GlideProperties.getBoolean('glide.installation.developer')
&& gs.hasRole('admin'))
return true;
return gs.hasRole(role);
},
/**
* Return list of privacy configs that current user can use in a job
*/
getAccessiblePrivacyConfigurations: function() {
gs.log('PrivacyUtil.getAccessiblePrivacyConfigurations has been deprecated');
},
/**
* Return true if and only if a table belongs to Data Privacy
*/
isDataPrivacyTable: function() {
var table = this.getParameter('sysparm_table');
return this.isDataPrivacyTableUtil(table);
},
isDataPrivacyTableUtil: function(table) {
return (table == 'dp_configuration' ||
table == 'dp_field_technique' ||
table == 'dp_job' ||
table == 'dp_primary_reference' ||
table == 'dp_technique' ||
table == 'dp_technique_parameter' ||
table == 'dp_technique_parameter_value' ||
table == 'dp_technique_with_params' ||
table == 'dp_federated_job' ||
table == 'dp_work_item' ||
table == 'm2m_dictionary_dataclass' ||
table == 'data_classification'
);
},
type: 'PrivacyUtil'
});
Sys ID
ebcc97f5ebf630101c396f16c5522883