Name

sn_cd.cd_ContentRestrictionAJAX

Description

Client APIs related to content restriction.

Script

var cd_ContentRestrictionAJAX = Class.create();
cd_ContentRestrictionAJAX.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
  	
  /** 
  * @return true if audience delegation is on
  */
  isAudienceDelegationPropertyOn: function() {
  	return gs.getProperty('sn_cd.activate_audience_delegation_controls') == 'true';
  },
  
  /** 
  * @return true if content restriction is on
  */
  isContentRestrictionPropertyOn: function() {
  	return gs.getProperty('sn_cd.activate_content_authoring_controls') == 'true';
  },
  
  /** 
  * @return true if topic ownership is on
  */
  isTopicOwnershipPropertyOn: function() {
  	return gs.getProperty('sn_cd.activate_topic_ownership') == 'true';
  },
  
  /** 
  * @return true if topic ownership is on and parent page category is not taxonomy
  */
  isPageOwnershipPropertyOnForNonTaxonomyPages: function() {
  	var pageGr = new GlideRecord('sp_page');
  	var pageId = this.getParameter('sysparm_page_sys_id');
  	if (pageId)
  		if (pageGr.get(pageId))
  			return gs.getProperty('sn_cd.activate_page_ownership') == 'true' && pageGr.category != 'sn_ex_sp_taxonomy';
  	return false;
  },

  type: 'cd_ContentRestrictionAJAX'
});

Sys ID

b5959e88c3a710102920b8889d40dd62

Offical Documentation

Official Docs: