Pergapedia / SSP7
SMTX SupportSMTX Wiki
  • Introduction
  • Pergapedia / SSP7 Admin guide
  • Catalog
    • Typical use cases
      • Usage as Knowledge Catalog
      • Usage as Data Catalog
      • Usage as Service Catalog
    • Catalog Maintenance
      • Templates
        • Create a new template
        • Version management of templates
        • ACL (Access Control Lists)
          • Scopes
          • Add default ACLs
          • Remove All ACLS
          • ACL condition script examples
        • Set translation label for Publication request button
      • Parts (Fields)
        • Field types
        • Calculations
        • Field Validation examples
        • Field Visibility Examples
        • Field Filtering
        • Default value
      • Actors
      • Reusable content
      • Settings
      • General Settings
      • Roles
      • Javascript for Variables in processes
      • Action Forms
        • Add log entries for Action Forms
    • Service Maintenance
      • Services
        • Filter list of services
        • Duplicating services
        • Adding a new service
        • Service Details
          • General settings
          • Service Data
          • Contracts
          • Actors
          • Receivers
          • Targets
          • Support Groups
          • Relations
          • Requests
          • Quality Notes
          • Publication History
          • Documents
          • Log
          • Service Actions
        • Compare versions
        • Quality Notes
        • Service Changed flag
      • Approvals
      • Relations
        • Start service from service
      • Subscriptions
      • Outages
    • Public
    • Service Catalog API
      • Outbound REST API
        • Get Services
        • Get Service Details
      • Inbound SOAP calls
        • Create custom approval
        • Add log to service publish request
        • Add person to service person list
        • Add persongroup to service persongroup list
        • Delete service
        • Mark service publish request as in approval state
        • Process service publish request
        • Publish request set can be cancelled
        • Publish request set show in public
        • Remove person from service person list
        • Remove persongroup from service persongroup list
        • Remove support group from service
        • Update service field
        • Update service language field
        • Update template part datetime value
        • Update template part numeric value
        • Update template part text value
  • Fulfillment Platform
    • Admin Panel
    • General Settings
      • General
      • My Profile
      • Mail Settings
      • Login
      • Forms Setting
      • Workflow
      • Archive
      • Calendar Overview
      • Dashboard
      • Mobile Component
      • Ticketing
      • Webhooks
      • Goto
      • Search options
      • Application URL Settings
      • Address Book Settings
    • Dashboard
    • Categories
    • Topics
    • Forms
      • Fields-tab
      • Field: General Settings
      • Dynamic Value
      • Text (Area) Field
      • Yes : No Field
      • Upload file(s)
      • Date (Time) Field
      • Password Field
      • Read Only Display Field
      • Header
      • Tab
      • Section
      • Repeatable section buttons
      • Subform
      • Static HTML
      • Hidden Field
      • Selection Fields
      • Calculations
    • Processes
      • General Settings
      • Dynamic Field Mapping
      • Process Steps
      • Step Types
      • Logging
    • Datastore
      • Process interaction
      • Manage datastore entries via Webservices - Javascript
    • Tasks
    • Auto Forms
    • Adapters
      • Person Data
      • Web Services
    • Event triggers
    • Roles
    • Rolesets
    • Groups
    • Views
      • View Example 1
      • View example 2
    • Mail Templates
    • Layouts
    • Mail queue
    • Reporting
    • External Apps
    • My Items
    • Translations
    • Bulk Uploads
    • Help page
    • Goto
    • Search
    • Inbound Email
    • Reporting Dashboard
    • Ticketing
      • My Activities
      • Ticketing Views
      • External Integrations
    • Release Manager
    • Content Management Console module
    • SSP Studio
    • Persons & Accounts
    • Pools
  • Release Notes
    • Terms and Conditions
      • December 2024
    • Release 7.21.01
    • Release 7.21.03
    • Release 7.21.04
    • Release 7.21.05
    • Release 7.21.06
    • Release 7.21.07
    • Release 7.21.08
    • Release 7.21.09
    • Release 7.21.10
    • Release 7.21.11
    • Release 7.21.12
    • Release 7.22.02
    • Release 7.22.03
    • Release 7.22.04
    • Release 7.22.05
    • Release 7.22.06
    • Release 7.22.07
    • Release 7.22.08
    • Release 7.22.09
    • Release 7.22.10
    • Release 7.22.12
    • Release 7.23.01
    • Release 7.23.02
    • Release 7.23.03
    • Release 7.23.04
    • Release 7.23.05
    • Release 7.23.07
    • Release 7.23.08
    • Release 7.23.09
    • Release 7.23.10
    • Release 7.23.11
    • Release 7.23.12
    • Release 7.24.02
    • Release 7.24.03
    • Release 7.24.04
    • Release 7.24.05
    • Release 7.24.06
    • Release 7.24.07
    • Release 7.24.08
    • Release 7.24.09
    • Release 7.24.10
    • Release 7.24.11
    • Release 7.24.12
    • Release 7.25.01
    • Release 7.25.02
    • Release 7.25.03
    • Release 7.25.04
    • Release 7.25.05
  • Guides
    • Installation Guide
      • Scheduled Task installation
    • Upgrade Guide
    • LDAP Import
    • Training
      • Exercise : Create a new form
      • Exercise : Create a new Datastore Parameter
      • Exercise : Create a new Process
      • Exercise : Create a new Role
    • SubTopics in Topics
  • Pergapedia platform
Powered by GitBook
On this page
  • Know the phase order
  • Only show a control when the phase = Concept
  • Only show a control when the phase is minimum X
  • Only show when phase is X or Y
  • Exclude Document categories
  • Include a document category
  • Only perform when a template part has a certain value
  • Only perform when a template part has a certain value & phase = Concept (1)
  • Only perform when a certain template part is different from a value, and the phase equals X

Was this helpful?

  1. Catalog
  2. Catalog Maintenance
  3. Templates
  4. ACL (Access Control Lists)

ACL condition script examples

Know the phase order

You need to know the order of the phase

This can be done via this query :

select * from scphase

Only show a control when the phase = Concept

Use this script:

if (!g_serviceguid) return false;

var service = JSON.parse(ServiceCatalogInterface.getServiceOverview(g_serviceguid));

return service && service.phase && service.phase.order === 1;

It will check the 'Order' of the phase, for 'Concept' this is always 1. ANy other phase: please check with SMTX to get the Order number.

Only show a control when the phase is minimum X

You need to know the order of the phase

This can be done via this query : select * from ScPhase

When you have the order, use this script, in our example, the order = 5:

//only from phase Final approval CTU

if (!g_serviceguid) return false;

var service = JSON.parse(ServiceCatalogInterface.getServiceOverview(g_serviceguid));

return service && service.phase && service.phase.order >= 5;

Only show when phase is X or Y

// enkel mogelijk in phases concept of Waiting for submission to CTC’ – or -- when the field Open_DOC_Categories_for_Team equals Yes

if (!g_serviceguid) return false;

//check the phase var service = JSON.parse(ServiceCatalogInterface.getServiceOverview(g_serviceguid)); if (service && service.phase && (service.phase.order === 1 || service.phase.order === 17)) return true;

//check the field Open_DOC_Categories_for_Team equals Yes return JSON.parse(ServiceCatalogInterface.getServiceParts(g_serviceguid, ["Open_DOC_Categories_for_Team"])).map(function (part) { return part.value; }).join("") === "Yes";

Exclude Document categories

You can define a number of values of a document part, and deny access to see these documents.

In the example below, we will wotk with the Document part 'DoC_Category'. We want only 'internals' to see them. To define this, we work in the opposite way, we will exclude them for the counterpart, being the 'externals'.

So, the code below excludes the following entries for the users with the role 'External' (as selected Persona).

var documentcategory = JSON.parse(g_data_string).parts.filter(function (p) { return p.internalname === "Doc_Category"; }).map(function (p) { return p.value; }).join("");

if (documentcategory) {

return ["ZA1","ZA2","ZA3","ZB1","ZC2"].indexOf(documentcategory) < 0;

}

return true;

So the Personas that get this ACL, do NOT have access to the values "ZA1","ZA2","ZA3","ZB1","ZC2". This means that they will not see documents that have this category. Please note that you will need hand out access rights for the other personas, see the chapter below.

Include a document category

When you want to give centrain Persona's access to Documents, based on a value in a document part, use this JS condition:

// This ACL gives access to the personas to access these documents

// Please note that we need a second ACL, where this category is excluded for everyone

// we include: ZC1, ZC2,

var documentcategory = JSON.parse(g_data_string).parts.filter(function (p) { return p.internalname === "Doc_Category"; }).map(function (p) { return p.value; }).join("");

if (documentcategory)

{ return ["ZC1","ZC2"].indexOf(documentcategory) >= 0;

}

return false;

Only perform when a template part has a certain value

The example below will be OK when the parth with the internal name 'INTERNAL_NAME' has the value 'CheckValue'.

if (!g_serviceguid) return false;

return JSON.parse(ServiceCatalogInterface.getServiceParts(g_serviceguid, ["INTERNAL_NAME"])).map(function (part) { return part.value; }).join("") === "CheckValue";

Only perform when a template part has a certain value & phase = Concept (1)

// enkel mogelijk in phase concept of when the field Open_DOC_Categories_for_Team equals Yes if (!g_serviceguid) return false;

//check the phase var service = JSON.parse(ServiceCatalogInterface.getServiceOverview(g_serviceguid)); if (service && service.phase && service.phase.order === 1) return true;

//check the field Open_DOC_Categories_for_Team equals Yes return JSON.parse(ServiceCatalogInterface.getServiceParts(g_serviceguid, ["Open_DOC_Categories_for_Team"])).map(function (part) { return part.value; }).join("") === "Yes";

Only perform when a certain template part is different from a value, and the phase equals X

// only active from phase Active (order 3) and // if field Service_Specification is different from Consulting

if (!g_serviceguid) return false; //check the phase var service = JSON.parse(ServiceCatalogInterface.getServiceOverview(g_serviceguid)); if (!(service && service.phase && service.phase.order === 3)) return false;

//check the field Service_Specification if (JSON.parse(ServiceCatalogInterface.getServiceParts(g_serviceguid, ["Service_Specification"])).map(function (part) { return part.value; }).join("") === "Consulting") return false;

return true;

PreviousRemove All ACLSNextSet translation label for Publication request button

Last updated 8 months ago

Was this helpful?