Skip to main content

Administrating MarkLogic Server

Creating an Execute Privilege

To create an execute privilege, follow these steps:

  1. Click the Security icon in the left tree menu.

  2. Click the Execute Privileges icon.

  3. Click the Create tab. The Execute Privilege Configuration page appears:

    new_ex_priv_v10.gif
  4. Enter the name of the execute privilege. Use a name that is descriptive of the action this execute privilege will protect. For example, create-user is the name of an execute privilege that gives a role the authorization to create a user.

  5. Enter a protected action, represented as a URI. You can use any URI but we recommend you follow the conventions for your company. For example, the URI for the create-user execute privilege is http://marklogic.com/xdmp/privileges/create-user.

  6. Under the Roles section, select the roles that are allowed to perform the protected action.

  7. Click OK.

The execute privilege is now added to the security database. You can now use the xdmp:security-assert() function in your code to associate this privilege with a protected operation.