sec:get-collection( $uri as xs:string ) as element(sec:collection)
Gets the security document corresponding to a protected collection with uri equal to $uri.
Parameters | |
---|---|
uri | The URI of a collection. |
http://marklogic.com/xdmp/privileges/unprotect-collection
orhttp://marklogic.com/xdmp/privileges/collection-set-permissions
orhttp://marklogic.com/xdmp/privileges/collection-add-permissions
orhttp://marklogic.com/xdmp/privileges/collection-remove-permissions
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 :) 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>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.