MarkLogic 12 EA 1 Product Documentation
sec.privilegeExists

sec.privilegeExists(
   action as String,
   kind as String
) as Boolean

Summary

This function returns true if the specified privilege exists.

Parameters
action The URI of the privilege.
kind The kind of privilege: "execute" or uri".

Required Privileges

http://marklogic.com/xdmp/privileges/get-privilege

Usage Notes

This function must be executed against the security database.

Example


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

sec.privilegeExists("http://marklogic.com/xdmp/privileges/getPrivilege",
      "execute")

      
Powered by MarkLogic Server | Terms of Use | Privacy Policy