Loading TOC...

MarkLogic 12 EA 1 Product Documentation
sec:user-get-default-permissions

sec:user-get-default-permissions(
   $user-name as xs:string
) as element(sec:permission)*

Summary

Returns a sequence of permission elements corresponding to the user's default permissions.

Parameters
user-name The name of a user.

Required Privileges

http://marklogic.com/xdmp/privileges/user-get-default-permission

Usage Notes

If a user with name $user-name is not found, an error is raised.

This function must be executed against the security database.

Example


(: execute this against the security database :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";

sec:user-get-default-permissions("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>
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.