sec:amp-get-roles( $namespace as xs:string, $local-name as xs:string, $document-uri as xs:string, $database as xs:unsignedLong ) as xs:string*
Returns a sequence of role names for the roles directly assigned to the amp ($namespace, $local-name, $document-uri).
http://marklogic.com/xdmp/privileges/amp-get-roles
If an amp is not found with the given identifiers, an error is returned.
This function must be executed against the security database.
(: 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:amp-get-roles( "http://marklogic.com/my_modules/myspace", "my-amp", "/MarkLogic/MyModule.xqy", 0) => Contractor Developer Temporary
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.