MarkLogic 12 EA 1 Product Documentation
sec:path-add-permissions

sec:path-add-permissions(
   $path as xs:string,
   $path-namespaces as element(sec:path-namespace)*,
   $permissions as element(sec:permission)+
) as empty-sequence()

Summary

This function adds permissions for a protected path.

Parameters
path The protected path.
path-namespaces The namespace(s) for the path.
permissions The permissions to add.

Required Privileges

http://marklogic.com/xdmp/privileges/path-add-permissions

Usage Notes

This function must be executed against the Security database.

If the protected path has a path set, it can only have read permissions.

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:path-add-permissions("/a[b=1]/c", (<sec:path-namespace>
<sec:prefix>ml</sec:prefix>
<sec:namespace-uri>marklogic.com</sec:namespace-uri>
</sec:path-namespace>),  
(xdmp:permission("els-user-1", "update"), (), xdmp:permission ("els-user-1", "update")))
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy