Access Rights
Access Rights
This page aims at explaining how access rights work in XWiki. It will help you configure access rights on your wiki so that every user can only see and do what he should be allowed to.
An overview of rights
Here is a lists of all the rights available in XWiki Enterprise and their default setting.
- Right name: brief description of the right
- Availability: at what level can you set this right?
- Page: this right can be set at the page level
- Space: this right can be set at the space level
- Wiki: this right can be set at the wiki level
- Default status: is the right allowed or denied when the checkbox is left blank?
- ALLOWED: this means that users CAN perform the given action if no other right is set
- DENIED: this means that users CANNOT perform the given action if no other right is set
- Priority order: which setting wins over another if an user has 2 different settings?
- Checking order: at what level is the right checked first?
- Availability: at what level can you set this right?
- View: whether users can see the page
- Availability:
- Page
- Space
- Wiki
- Default status: ALLOWED
- Priority order: deny > allow > no setting
- Checking order: page > space > wiki
- Availability:
- Comment: whether users can add a comment to the page
- Availability:
- Page
- Space
- Wiki
- Default status: ALLOWED
- Priority order: deny > allow > no setting
- Checking order: page > space > wiki
- Availability:
- Edit: whether users can edit and save modifications to the page
- Availability:
- Page
- Space
- Wiki
- Default status: ALLOWED
- Priority order: deny > allow > no setting
- Checking order: page > space > wiki
- Availability:
- Delete: whether users can delete the page
- Availability:
- Page
- Space
- Wiki
- Default status: DENIED (unless you're the document creator)
- Priority order: deny > allow > no setting
- Checking order: page > space > wiki
- Availability:
- Admin: whether users can manage administration settings for the space / wiki
- Availability:
- Space (Automatically includes the view, comment, edit, delete rights)
- Wiki (Automatically includes the view, comment, edit, delete, register, program rights)
- Default status: ALLOWED
- Priority order: allow > deny > no setting
- Checking order: wiki > space
- Availability:
- Register: whether users can create new user accounts
- Availability:
- Wiki
- Default status: ALLOWED
- Priority order: allow > deny > no setting
- Checking order: wiki
- Availability:
- Program: whether users can use protected APIs & Groovy code in wiki pages
- Availability:
- Wiki
- Default status: DENIED
- Priority order: allow > deny > no setting
- Checking order: wiki
- Availability:
Execution order
Whenever XWiki meets a rights API call when trying to display a document, it goes through the following path:
Execution order | Check | |
---|---|---|
1 | Admin at wiki level? | |
2 | Admin at space level? | |
3 | View at page level? | |
4 | View at space level? | |
5 | View at wiki level? | |
6 | Comment, Edit, Delete at page level? | |
7 | Comment, Edit, Delete at space level? | |
8 | Comment, Edit, Delete, Register, Program at wiki level? |
The full answer lies in the code
As soon as it finds an explicit value, the path stops. If no value is found for a right for the current user but an ALLOW value has been given to another user at the same level, the path stops. If no explicit value is found, the default value is used.
Let's take some examples:
- Mike arrives on the Main.WebHome page. He's logged in and has edit rights set to ALLOW on the Main space. The following process takes place:
First, the wiki tries to find out to which groups the current user belongs to.
Let's say Mike belongs to the following groups: Sales, Marketing and Management.
Mike tries to view a page.
XWiki will:
- Check for admin rights at the wiki level
- Mike and/or one of his groups has an Allow right -> Mike has admin rights on the page
- Mike and/or one of his groups have a Deny right -> Mike doesn't have admin rights on the page
- Mike and/or the Sales group have a Deny right but the Management group has an Allow right -> Mike has admin rights on the page (Allow wins over Deny for Admin)
- No right set for Mike or his groups and no Admin right set for any other user or group -> Mike has admin rights on the page
- No right set for Mike or his groups and other users or groups have admin rights allowed -> Mike doesn't have admin rights on the page
- * Check if Mike or one of the groups he belongs to has admin rights on the space
- XWiki Enterprise
- Admin rights on space? if no,
- Admin rights on wiki? if no,
- View / Comment / Edit / Delete rights on page? if no,
- View / Comment / Edit / Delete rights on space? if no,
- View / Comment / Edit / Delete / Register / Programming rights on wiki? if no,
- The wiki can be accessed and managed by anyone
- XWiki Enterprise Manager
- Admin rights on space? if no,
- Admin rights on wiki? if no,
- Admin rights on wiki farm? if no,
- View / Comment / Edit / Delete rights on page? if no,
- View / Comment / Edit / Delete rights on space? if no,
- View / Comment / Edit / Delete / Register rights on wiki? if no,
- View / Comment / Edit / Delete / Register / Programming rights on wiki farm? if no,
- The wiki farm can be accessed and managed by anyone