sec.unprotectCollection( uri as String ) as null
Removes the protection of a collection $uri. This does not remove the collection or any of its documents, but it does remove the protected collection from the security database.
Parameters | |
---|---|
uri | The URI of the collection from which to remove protections. |
http://marklogic.com/xdmp/privileges/unprotect-collection
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.
// execute this against the security database declareUpdate(); const sec = require('/MarkLogic/security.xqy'); sec.unprotectCollection("http://marklogic.com/dev_modules") // Removes protection from the "dev_modules" collection.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.