Created
September 6, 2018 16:33
-
-
Save rjrudin/9c82f0e81fea510dcad093d5fa61f5be to your computer and use it in GitHub Desktop.
MarkLogic permission query
This file contains hidden or 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
declare function permission-query($role, $capability) | |
{ | |
cts:term-query( | |
xdmp:add64( | |
xdmp:mul64(xdmp:add64(xdmp:mul64(xdmp:role($role), 5), xdmp:hash64($capability)), 5), | |
xdmp:hash64("permission()") | |
) | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment