MarkLogic 12 EA 1 Product Documentation
sec:validate-permissions

sec:validate-permissions(
   $permissions as element(sec:permission)*
) as node()*

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


  xquery version "1.0-ml"; 

  import module namespace sec = "http://marklogic.com/xdmp/security" 
      at "/MarkLogic/security.xqy";

  sec:validate-permissions(xdmp:permission("my-role", "read"))
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy