Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec:unprotect-collection

sec:unprotect-collection(
   $uri as xs:string
) as empty-sequence()

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 :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
     "/MarkLogic/security.xqy";

sec:unprotect-collection("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.