sec.validatePermissions

sec.validatePermissions(
   permissions as element(sec.permission)[]
) as Sequence

Summary

This function throws the SEC_NOPERMCAP exception if a permission has no capability specified and it throws the SEC-NOPERMROLEID exception if there is no role specified in the permission.

Parameters
permissions Zero or more permission elements to check.

Usage Notes

This function must be executed against the security database.

Example


   
  const sec = require('/MarkLogic/security.xqy');

  sec.validatePermissions(xdmp.permission("Temporary", "read","element"))
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy