IBM Support

JavaScript example of deleting an Access Control Entry from the Security of an object using bulk processing with Administration Console for Content Engine (ACCE)

Technical Blog Post


Abstract

JavaScript example of deleting an Access Control Entry from the Security of an object using bulk processing with Administration Console for Content Engine (ACCE)

Body

In the Administration Console for Content Engine (ACCE) you can apply JavaScript bulk actions to the search results of an object store query.  This example shows how to delete an Access Control Entry from the security of an object using bulk processing with Administration Console for Content Engine (ACCE)

  1. Open an object store and create an object store search.
  2. On the SQL view tab, enter the following query:

    SELECT TOP 100 This FROM Document
     
  3. Select Enable bulk action on the bulk action tab.
  4. In the Script section, click Run script.
  5. Copy the following JavaScript code and paste it into the Script field. Replace "orphaned SID here" with your user/group (ie. user@domain.com) or SID value.

    importPackage(Packages.com.filenet.api.core);
    importPackage(Packages.com.filenet.api.security);
    importClass(Packages.com.filenet.api.constants.RefreshMode);
    importClass(Packages.com.filenet.api.property.Properties);

    function OnCustomProcess (CEObject) {
        CEObject.refresh();
        var apl = CEObject.get_Permissions();
        var iter = apl.iterator();
        while (iter.hasNext()) {
              var perm = iter.next();
              If (perm.get_GranteeName().equals("orphaned SID here")){
                   iter.remove();
                   CEObject.save(RefreshMode.REFRESH);
                   break;
             }
        }
    }

     
  6. Click Run. The administration console runs the query and the JavaScript action.
  7. After the query runs, confirm that the specified user or group has been removed from the object's security.

This information has been included in the following IBM technote:  /support/pages/node/268165

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSNVNV","label":"FileNet Content Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

UID

ibm11280524