MarkLogic 12 EA 1 Product Documentation
sec:privilege-get-roles

sec:privilege-get-roles(
   $action as xs:string,
   $kind as xs:string
) as xs:string*

Summary

Returns a sequence of role names for the roles assigned to the privilege ($action,$kind).

If a privilege with action equal to $action is not found, an error is returned.

Parameters
action The action URI for the privilege. If $kind is a URI privilege, then use the URI to protect for the action parameter.
kind Either "execute" or "uri".

Required Privileges

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

Usage Notes

This function must be executed against the security database.

Example


(: execute this against the security database :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";
   
sec:privilege-get-roles(
    "http://marklogic.com/xdmp/privileges/create-role", 
     "execute")
=>

security
Powered by MarkLogic Server | Terms of Use | Privacy Policy