Created
September 25, 2019 14:23
-
-
Save eouthwaite/4bb3eb41ad340728bb15cef9ce49abe5 to your computer and use it in GitHub Desktop.
xdmp:role-name is available in ML10 and so useful I need to replicate in 8 and 9...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace sec="http://marklogic.com/xdmp/security" at "/MarkLogic/security.xqy"; | |
declare function local:role-name( | |
$role-id as xs:unsignedLong | |
) as xs:string { | |
xdmp:invoke-function( | |
function() { sec:get-role-names($role-id) }, | |
<options xmlns="xdmp:eval"> | |
<database>{xdmp:database("Security")}</database> | |
</options> | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment