MarkLogic Server 11.0 Product Documentation
sec:get-collection

sec:get-collection(
   $uri as xs:string
) as element(sec:collection)

Summary

Gets the security document corresponding to a protected collection with uri equal to $uri.

Parameters
uri The URI of a collection.

Required Privileges

http://marklogic.com/xdmp/privileges/unprotect-collection or
http://marklogic.com/xdmp/privileges/collection-set-permissions or
http://marklogic.com/xdmp/privileges/collection-add-permissions or
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 :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
     "/MarkLogic/security.xqy";
 
sec:get-collection("http://marklogic.com/cpf/domains")

=>
  
<sec:collection xmlns:sec="http://marklogic.com/xdmp/security">
  <sec:collection-id>403495114666638078</sec:collection-id>
  <sec:uri>http://marklogic.com/cpf/domains</sec:uri>
</sec:collection>
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy