Test It Out
- Last Updated: May 20, 2026
- 2 minute read
- MarkLogic Server
- Version 12.0
- Documentation
Using the Query Console, you can execute Scenario 1, Scenario 2, and Scenario 3 for each one of the users user1, user2, and user3. The results of the execution are presented in the following table:
User |
Role |
Scenario |
Result |
|---|---|---|---|
|
|
Add range index to database db1 |
Success |
|
|
Add range index to database db2 |
Success |
|
|
Add backup for database db1 |
Failure |
|
|
Add range index to database db1 |
Success |
|
|
Add range index to database db2 |
Failure |
|
|
Add backup for database db1 |
Success |
|
|
Add range index to database db1 |
Success |
|
|
Add range index to database db2 |
Failure |
|
|
Add backup for database db1 |
Failure |
The following analysis explains these results:
-
The user
user1successfully adds indexes to both databasesdb1anddb2, but fails to add backup to databasedb1, because the user’srole1has granular privilegehttp://marklogic.com/xdmp/privileges/admin/database/indexthat allows to add indexes to any database but does not allow other operations on databases. -
The user
user2successfully adds both the index and backup to databasedb1, but fails to add index to databasedb2, because the user’srole2has granular privilegehttp://marklogic.com/xdmp/privileges/admin/database/db1_identifier that allows this user to perform any operation on databasedb1but does not allow operations on other databases. -
The user
user3successfully adds index to databasedb1but fails to add index to databasedb2and to add backup to databasedb1, because the user’srole3has granular privilegehttp://marklogic.com/xdmp/privileges/admin/database/index/db1_identifier that allows to add indexes to databasedb1but does not allow any other operation on databasedb1and does not allow any operation on other databases.