xdmp.userPrivileges( user as String, [extSecId as (Number|String)], [secDbFirst as Boolean] ) as Sequence
Return IDs of all privileges that a user have.
http://marklogic.com/xdmp/privileges/xdmp-user-privileges
xdmp.userPrivileges("ian") => [239871567325, 432987324]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.