Loading TOC...

MarkLogic 10 Product Documentation
dls.documentRemovePermissions

dls.documentRemovePermissions(
   uri as String,
   permissions as Sequence
) as null

Summary

This function removes the specified permissions from the named document.

Parameters
uri The URI of the document.
permissions The permissions to be removed from the document. When run in an XQuery context, the permissions are a sequence of XML elements (sec:permission). When importing this module into a Server-Side JavaScript context, the permissions are an array of Objects.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

// Removes the specified permissions from the list of permissions for 
// the 'baz.xml' document.

const dls = require('/MarkLogic/dls');

dls.documentRemovePermissions(
                   '/foo/bar/baz.xml', 
                   [xdmp.permission('Developer', 'read'),
                    xdmp.permission('Developer', 'update')]);
    
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.