MarkLogic 12 EA 1 Product Documentation
sec.unprotectCollection

sec.unprotectCollection(
   uri as String
) as null

Summary

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.

Required Privileges

http://marklogic.com/xdmp/privileges/unprotect-collection

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.unprotectCollection("http://marklogic.com/dev_modules")

// Removes protection from the "dev_modules" collection. 
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy