Loading TOC...

MarkLogic Server 11.0 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. 
   

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