
sec:unprotect-path( $path as xs:string, $path-namespaces as element(sec:path-namespace)* ) as empty-sequence()
This function removes protection from the specified protected path, without removing the path itself from the Security database.
| Parameters | |
|---|---|
| path | The name of the path. |
| path-namespaces | The namespace(s) for the path. |
http://marklogic.com/xdmp/privileges/unprotect-path
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:unprotect-path("/root/bar[@baz=1]", ()),
sec:unprotect-path("test", ()),
sec:unprotect-path("/root/reg[fn:matches(@expr, 'is')]", ())
(: 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-path("/root/bar[@baz=1]", (sec:security-path-namespace("ml", "marklogic.com")))
(: removes the protected path for the element in the ml namespace :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.