MarkLogic 12 EA 1 Product Documentation
sec.unprotectPath

sec.unprotectPath(
   path as String,
   path-namespaces as element(sec.pathNamespace)[]
) as null

Summary

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.

Required Privileges

http://marklogic.com/xdmp/privileges/unprotect-path

Usage Notes

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-path("/root/bar[@baz=1]", ()),
sec:unprotect-path("test", ()),
sec:unprotect-path("/root/reg[fn:matches(@expr, 'is')]", ())
    

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-path("/root/bar[@baz=1]", (sec:security-path-namespace("ml", "marklogic.com")))

(: removes the protected path for the element in the ml namespace :)
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy