
sec.ampGetRoles( namespace as String, local-name as String, document-uri as String, database as (Number|String) ) as Sequence
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
 
const sec = require('/MarkLogic/security.xqy');
 
sec.ampGetRoles(
    "http://marklogic.com/my_modules/myspace",
    "my-amp",
    "/MarkLogic/MyModule.xqy",
    0)
=>
Contractor
Developer
Temporary