Loading TOC...

sec.removePath

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

Summary

This function removes protection from the specified protected path and removes the path from the Security database.

Parameters
path The name of the path to remove.
path-namespaces The namespace(s) for the path to be removed.

Required Privileges

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

Usage Notes

This function must be executed against the Security database.

Example


     // execute this against the Security database
    declareUpdate();
    const sec = require('/MarkLogic/security');

    sec.removePath("/root/bar[@baz=1]", []);
    sec.removePath("test", []);
    sec.removePath("/root/reg[fn:matches(@expr, 'is')]", []);
      

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.