sec.userGetDefaultPermissions( user-name as String ) as Sequence
Returns a sequence of permission elements corresponding to the user's default permissions.
Parameters | |
---|---|
user-name | The name of a user. |
http://marklogic.com/xdmp/privileges/user-get-default-permission
If a user with name $user-name is not found, an error is raised.
This function must be executed against the security database.
// execute this against the security database // There is no JSON output for this function. const sec = require('/MarkLogic/security.xqy'); sec.userGetDefaultPermissions("Jim") => <sec:permission xmlns:sec="http://marklogic.com/xdmp/security"> <sec:capability>update</sec:capability> <sec:role-id>16363340809666818373</sec:role-id> </sec:permission> <sec:permission xmlns:sec="http://marklogic.com/xdmp/security"> <sec:capability>read</sec:capability> <sec:role-id>16363340809666818373</sec:role-id> </sec:permission>