Wiki.js has a powerful permission system with fine grained control over what your users can see and do.
Permissions are managed at the group level.
Page rules specify what a user can do on one or more pages, whether it's viewing a page, making edits, upload assets or posting comments. They are optionally tied to specific sites and locales.
A page rule consists of the following elements:
The enformement mode determines whether the rule grants or deny permissions.
One or more permissions can be selected for a page rule:
| Name | Key | Description | Note |
|---|---|---|---|
| Read Pages | read:pages |
Can view and search pages. | |
| Write Pages | write:pages |
Can create and edit pages. | |
| Review Pages | review:pages |
Can review and approve edits submitted by users. | |
| Manage Pages | manage:pages |
Can move existing pages to other locations the user has write access to. | |
| Delete Pages | delete:pages |
Can delete existing pages. | |
| Use CSS | write:styles |
Can insert CSS styles in pages. | |
| Use JavaScript | write:scripts |
Can insert JavaScript in pages. | |
| View Page Source | read:source |
Can view the pages source. | |
| View Page History | read:history |
Can view previous versions of pages. | |
| View Assets | read:assets |
Can view / use assets (such as images and files) in pages. | |
| Upload Assets | write:assets |
Can upload new assets (such as images and files). | |
| Manage Assets | manage:assets |
Can edit and delete existing assets (such as images and files). | |
| Read Comments | read:comments |
Can view page comments. | |
| Write Comments | write:comments |
Can post new comments on pages, edit and delete their own comments. | |
| Manage Comments | manage:comments |
Can edit and delete any existing page comments. |
A site filter can be applied to limit the page rule to only specific sites instead of all sites.
A locale filter can be applied to limit the page rule to only specific locales instead of all locales.
Select how this page rule will match pages:
Important
- Don't include a leading slash
/for Path Starts With... and Path is Exactly...- Don't include the leading and trailing slash
/for Path Matches Regex
Rule specificity specifies which rule wins over another when they apply to the same page. The page with the highest specificity always win.
The specificity is determined in order by:
In other terms,
Example 1 - Path
Assuming you have 2 rules:
Rule 1 Deny
Path starts with fooRule 2 Allow
Path starts with foo/barRule 2 wins because the path is more specific than Rule 1.
Example 2 - Pattern Matching
Assuming you have 2 rules:
Rule 1 Deny
Path starts with foo/barRule 2 Allow
Path is Exactly foo/barRule 2 wins because the matching pattern is more specific than Rule 1.
Example 3 - Enforcement Mode
Assuming you have 2 rules:
Rule 1 Deny
Path starts with foo/barRule 2 Allow
Path starts with foo/barRule 1 wins because a Deny overrides an Allow when everything else is the same.
This use case mostly happens when a user is part of 2 groups, where one has Allow and another has Deny on the same path.
Global permissions represents administrative actions a user can perform. They are not tied to specific pages or sites.
| Name | Description | Note |
|---|---|---|
access:admin |
Can access the administration area. | This permission should be granted to anyone with one or more of the permissions below. |
read:users |
Can view users, but not create or modify. | |
manage:users |
Can create / manage users. | Cannot modify users with manage:system permissions. |
read:groups |
Can view groups and their permissions, but not create or modify them. | |
manage:groups |
Can create / manage groups and assign permissions / page rules. | Cannot modify groups with manage:system permissions. |
read:audit |
Can read the audit log, i.e. the record of what everybody on this wiki has done. | Usually granted for security auditors. |
read:metrics |
Can scrape the Prometheus metrics endpoint from an address it is not open to anonymously. | Usually for use by APIs and automations. |
manage:navigation |
Can manage site navigation | |
manage:theme |
Can modify site theme settings | |
manage:sites |
Can create / manage sites | |
manage:system |
Can manage and access everything. Root administrator. |