MarkLogic Server 11.0 Product Documentation
sec.pathAddPermissions

sec.pathAddPermissions(
   path as String,
   path-namespaces as element(sec.pathNamespace)[],
   permissions as element(sec.permission)[]
) as null

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


    declareUpdate(); 
    const sec = require('/MarkLogic/security');

    sec.pathAddPermissions("/a[b=1]/c",
                       sec.securityPathNamespace('ml', 'marklogic.com'),
                      [xdmp.permission("els-user-1", "update","element"), null, xdmp.permission("els-user-1", "update","element")])
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy