MarkLogic 10 Product Documentation
sec.roleExists

sec.roleExists(
   role-name as String
) as Boolean

Summary

This function returns true if the specified role exists in the security database.

Parameters
role-name The role name.

Required Privileges

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

Usage Notes

This function must be executed against the security database.

Example


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

  sec.roleExists("my-role")
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy