Loading TOC...

MarkLogic 12 EA 1 Product Documentation
sec.collectionRemovePermissions

sec.collectionRemovePermissions(
   uri as String,
   permissions as element(sec.permission)[]
) as null

Summary

Removes the permissions $permissions from the protected collection identified by $uri.

Parameters
uri The URI of a collection.
permissions Permissions to be removed from that protected collection. If $permissions is the empty sequence, the function will have no effect.

Required Privileges

http://marklogic.com/xdmp/privileges/collection-remove-permissions

Usage Notes

If a protected collection with uri equal to $uri is not found, an error is raised.

This function must be executed against the security database.

Example


// execute this against the security database

declareUpdate();
const sec = require('/MarkLogic/security.xqy');
 
sec.collectionRemovePermissions("http://marklogic.com/dev_modules",
                                  [xdmp.permission("Developer", "update","element")])
  
// Removes the Developer(update) permission from the "dev_modules" collection. 

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