
sec.unprotectPath( path as String, path-namespaces as element(sec.pathNamespace)[] ) as null
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
declareUpdate();
const sec = require('/MarkLogic/security.xqy');
sec.unprotectPath("/root/bar[@baz=1]", []);
sec.unprotectPath("test", []);
sec.unprotectPath("/root/reg[fn:matches(@expr, 'is')]", []);
// execute this against the security database
declareUpdate();
const sec = require('/MarkLogic/security.xqy');
sec.unprotectPath("/root/bar[@baz=1]", sec.securityPathNamespace("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.