Roles and permissions
The screens that hold these settings are described in Site administration.
ProjectWikit splits permissions down to single tasks, and each admin screen answers to its own permission. You can give a role only the Tickets permissions and let it enter the admin panel, which makes posts such as "ticket reviewer" or "application reviewer": people who handle their own kind of work without holding the whole admin panel.
The model
One ProjectWikit instance serves one or more sites.
- An account belongs to the instance. The same account signs in on every site of the instance, and its name, display name, email address and profile are the same everywhere.
- A role belongs to one site. Holding a role on one site grants nothing on another.
- Permissions come from roles. An account's permissions on a site are worked out from the roles it holds there.
- A superuser is above all of this. An active superuser has every permission on every site of the instance and is not affected by sanctions or IP bans.
- A site superuser is above all of this on one site. On that site they have every permission and are not affected by its sanctions or IP bans. On other sites they are an ordinary account, and they cannot change the account itself.
Every site has two built-in roles that are never assigned by hand:
| Role | Held by |
|---|---|
everyone | Everyone, signed in or not |
registered | Every signed-in account |
The roles an account is given on a site come on top of those two.
Sites created with pwikit createsite also start with two ordinary roles, admin and member, which can be changed or deleted; see Site administration.
What a role holds
Each role holds one decision per permission:
| Value | Meaning |
|---|---|
| Allow | The role grants the permission |
| Deny | The role refuses the permission, and the refusal wins over any grant |
| Inherit | The role says nothing; other roles decide. When none of the account's roles allows it, the account does not have the permission |
TIP
Inherit and Deny both leave a permission ungranted, but they work very differently. Inherit means the role says nothing: if any other role the member holds, including everyone and registered, allows the permission, the member has it. Deny overrides every allow: if any role the member holds denies a permission, the member does not have it, whatever the other roles say.
When a role should not give a permission, use Inherit. Setting Deny on everyone or registered takes the permission away from everyone except superusers.
A role also carries:
- Can enter the admin panel: whether the role opens the admin panel at all. The screens inside it still need their own permissions.
- Rank: a number that decides who may sanction whom. An account may only sanction, or reset the votes of, accounts whose number is larger than its own. Adding and removing roles is not limited by rank and needs only Manage permission settings. Superusers may edit anyone; a site superuser may edit anyone on that site except a superuser.
How a decision is made
For one account, on one site, about one page or forum object, in this order:
- A deactivated account has no permissions, not even reading.
- An active superuser, or an active site superuser of this site, has every permission. Nothing below applies.
- The grants of every role held are added together. A permission granted by any role is granted.
- Category and section overrides replace what a role says, for pages in that category and threads in that forum section. See below.
- Every refusal is applied. If any role refuses a permission, or an override refuses it for a role the account holds, the account does not have it — even if another role grants it.
- Object rules apply. Locked pages and threads and authorship adjust the result; see Locks, authors and the forum.
- An unverified email address removes the write permissions when the site requires verification. See Registration and accounts.
- The site's sanctions are applied last. See Sanctions.
The Permission check screen of the admin panel walks through these steps for one account and one permission.
Category overrides
Every page category can override what one role says, for pages in that category and their comment threads only. Overrides are set on the Page categories screen of the admin panel and cover only the page and forum permissions; every other permission is always decided for the whole site.
Each permission in an override takes one of four values:
| Value | Effect in the category |
|---|---|
| Allow | The role grants the permission |
| Inherit | The role's site-wide value applies |
| Withhold | The role does not grant the permission, even if it does site-wide. Other roles can still grant it |
| Deny | No account holding the role has the permission, superusers aside |
TIP
To make a category readable by administrators only, set View pages to Withhold for everyone and registered, and to Allow for the administrator role. Do not set it to Deny for everyone. Every account holds everyone, so a refusal there stops administrators from reading as well.
An override cannot bring back a permission that another role refuses: step 5 runs after the override. To grant a permission in one category only, make sure no role the account holds refuses it.
Section overrides
Every forum section can override what one role says, for the section and the threads and posts in it. Overrides are set on the Forum sections screen of the admin panel, cover only the forum permissions, and follow the same rules as category overrides. A page's comment thread follows the overrides of the page's category, not those of a section.
Locks, authors and the forum
| Situation | Effect |
|---|---|
| Page is locked | Without Lock pages, an account loses Edit pages, Edit page tags, Move pages, Manage page files, Delete pages and Manage page authors on that page |
| Account is an author of an unlocked page | Gains Manage page authors on that page. A locked page gives authors nothing extra |
| Account started the thread | May edit that thread |
| Account wrote the post | May edit its own post while it may create forum posts on the site |
| Thread is locked | Without Lock forum threads, an account cannot comment, reply, edit or delete posts, or edit, pin or move the thread |
| Account's forum access is off through Forum active or Forum inactive until | The same restrictions as a locked thread, in every thread |
Example setups
These examples assume the site kept the four roles it was created with: everyone, registered, member and admin. Every value not mentioned is Inherit. Once a setup is in place, check the result for the accounts concerned on the Permission check screen.
Visitors read, signed-in members take part
| Role | Site-wide |
|---|---|
everyone | Allow View pages, View page comments and the four forum viewing permissions |
registered | Allow Rate pages, Comment on pages, Create forum posts |
Visitors who are not signed in can only read. Once signed in, anyone can rate, comment and reply without being given a role.
A sandbox category anyone can write in
| Role | Override in sandbox |
|---|---|
registered | Allow Create pages, Edit pages |
Every signed-in account can create and edit pages under sandbox:. Other categories are unaffected.
A category only staff can read
| Role | Override in admin |
|---|---|
everyone | Withhold View pages, View page comments |
registered | Withhold View pages, View page comments |
member | Withhold View pages, View page comments |
admin | Allow View pages, View page comments |
Accounts holding admin can read these pages and nobody else can see them. Setting everyone to Deny would stop the admin holders from reading as well.
A forum section only staff can enter
| Role | Override in the Staff section |
|---|---|
everyone, registered, member | Withhold View forum sections, View forum categories, View forum threads, View forum posts |
admin | Allow those four, plus Create forum threads and Create forum posts |
Other accounts neither see the section nor open its threads, and site search and the sitemap leave them out too.
Only staff post announcements
| Role | Override in the Announcements section |
|---|---|
registered, member | Withhold Create forum threads |
admin | Allow Create forum threads |
Even if the site lets signed-in accounts start threads everywhere else, only admin holders can start one in the announcements section. Everyone else can still reply.
Newcomers cannot create pages in the main category
Make a newbie role and give it to new members.
| Role | Override in canon |
|---|---|
newbie | Deny Create pages |
An account holding newbie cannot create pages under canon:, even if it also holds member; removing newbie lifts it. This uses Deny rather than Withhold because member would still grant the permission.
Keeping one person quiet for a while
Do not make a role that denies posting for this. Use Silence from Sanctions: a sanction can be given an end time, lifts itself when that time passes, and stays on record in the member page.
The permission list
Permissions are grouped as Pages, Forum, Social, Tickets, Member actions and Admin panel. Two of the groups are worth reading before the rest:
- Member actions decides what an administrator may do to a member of this site. Each sanction below has its own permission, so "may silence" and "may ban" are given separately.
- Admin panel decides which screens open at all. Holding Manage users opens the member list and member pages; acting on a member still needs a permission from Member actions.
| Permission | Code | Allows |
|---|---|---|
| Pages | ||
| View pages | view_articles | Reading pages |
| Rate pages | rate_articles | Rating pages |
| Create pages | create_articles | Creating pages |
| Edit pages | edit_articles | Editing source, title and parent page, reverting; opens the Pages screen |
| Edit page tags | tag_articles | Changing a page's tags |
| Move pages | move_articles | Renaming and moving pages |
| Lock pages | lock_articles | Locking and unlocking pages, and keeping all rights on locked pages |
| Manage page files | manage_article_files | Uploading, renaming and deleting attachments |
| Delete pages | delete_articles | Deleting pages |
| Reset page ratings | reset_article_votes | Clearing all votes of a page |
| Comment on pages | comment_articles | Posting page comments |
| View page comments | view_article_comments | Reading page comments |
| Manage page authors | manage_article_authors | Changing a page's authors, together with Edit pages |
| Forum | ||
| View forum posts | view_forum_posts | Reading posts |
| Create forum posts | create_forum_posts | Replying in threads |
| Edit forum posts | edit_forum_posts | Editing anyone's posts |
| Delete forum posts | delete_forum_posts | Deleting posts |
| View forum threads | view_forum_threads | Reading threads |
| Create forum threads | create_forum_threads | Starting threads |
| Edit forum threads | edit_forum_threads | Changing any thread's title and description |
| Pin forum threads | pin_forum_threads | Pinning threads |
| Lock forum threads | lock_forum_threads | Locking threads, and posting in locked threads |
| Move forum threads | move_forum_threads | Moving threads to another category |
| View forum sections | view_forum_sections | Seeing sections |
| View forum categories | view_forum_categories | Seeing forum categories |
| Social | ||
| Send private messages | send_direct_message | Sending private messages |
| Tickets | ||
| View user reports | view_user_reports | The User reports screen |
| View user tickets | view_user_tickets | The Support tickets screen |
| Review membership applications | review_membership_applications | The Membership applications screen |
| Member actions | ||
| Ban members | ban_members | Banning a member from this site |
| Silence members | mute_members | Silencing a member on this site |
| Restrict member editing | restrict_member_editing | Taking page editing away from a member on this site |
| Restrict member rating | restrict_member_rating | Taking rating away from a member on this site |
| Reset member ratings | reset_member_votes | Clearing the votes a member cast on this site |
| Invite members | invite_members | Creating accounts, invite links, claim links and account activation |
| Manage bot accounts | manage_bots | Creating bot accounts |
| Admin panel | ||
| Manage users | manage_users | Opening the Users and Invite links screens, and member pages |
| Manage roles | manage_roles | The Roles and Role categories screens |
| Manage site | manage_site | The Site settings and Themes screens |
| View admin log | view_actions_log | The Admin log screen and the dashboard's recent actions |
| Manage categories | manage_categories | The Page categories screen |
| Manage tags | manage_tags | The Tags and Tag categories screens |
| Manage forum | manage_forum | The three forum screens |
| View vote times | view_votes_timestamp | When each vote was cast, in rating details and account activity |
| Manage permission settings | manage_permissions | Permission matrices, category and section overrides, assigning roles, the role fields of the site settings, and the role granted on membership applications |
Sanctions
A sanction is what one site has taken away from one of its members. Sanctions are held per site: the same account can be banned on one site of the instance and untouched on another.
| Sanction | Takes away | Needs |
|---|---|---|
| Ban | Everything the other three take away | Ban members |
| Silence | Commenting, starting threads, replying, editing and deleting posts, editing, pinning and moving threads | Silence members |
| No editing | Creating, editing, tagging, moving, locking and deleting pages, managing attachments and authors, resetting votes | Restrict member editing |
| No rating | Rating pages | Restrict member rating |
Rules that hold for all of them:
- A sanctioned member can still read. Reading pages, comments and the forum is never taken away, and signing in still works.
- Private messages are never taken away, because they do not belong to one site.
- A sanction can be given an end time. It stops applying by itself when that time passes; the record stays visible in the member page. Leaving the time empty makes it last until somebody lifts it.
- A reason can be recorded with each sanction.
- Superusers and site superusers cannot be sanctioned. Only a superuser or another site superuser of the site may sanction a site superuser.
A sanction is set on the member page in the admin panel, in the Sanctions on this site section. Each sanction shows only to accounts holding the matching permission.
Besides sanctions on an account, an account holding Ban members can also ban by address; see IP bans.
Site powers and instance powers
The account itself is shared by every site of the instance, so anything written on the account is reserved for superusers. A site administrator can act inside the site, and nowhere else.
| Action | Who | Reaches |
|---|---|---|
| Ban, silence, restrict editing or rating | A role holding the matching permission | This site |
| Clear the votes a member cast | Reset member ratings | This site |
| Assign roles | Manage permission settings | This site |
| Create accounts, invite links, claim links, bots | Invite members / Manage bot accounts | This site |
| Change a username, display name, profile text or email address | Superuser | The instance |
| Deactivate an account, so that it cannot sign in anywhere | Superuser | The instance |
| Turn the forum off for an account across the instance | Superuser | The instance |
| Take private messaging away from an account | Superuser | The instance |
| Grant or remove superuser | Superuser | The instance |
| Grant or remove site superuser | A superuser or a site superuser of the site | The site |
On a member page, an administrator who is not a superuser sees these account settings as text and cannot change them.
Differences from Wikidot
| Wikidot | ProjectWikit | |
|---|---|---|
| Who may do what | Fixed classes: anyone, members, moderators, administrators | Any number of roles, each holding a decision per permission |
| Permission detail | One setting per action per category | A separate permission per action, and a category or forum section may override any of them for any role |
| Several roles at once | A member is in one class | An account holds any number of roles; grants add up and any refusal wins |
| Banning | Blocks a member from the site | Four separate sanctions per site, each with an optional end time; the account itself is untouched |
| Account-wide action | Not applicable | Reserved for superusers |
| Where the settings live | Site Manager | The admin panel, described in Site administration |
Wikidot's per-category permission table has no direct equivalent, because a category override here names roles rather than classes. To reproduce a Wikidot setup, make one role for each class the wiki used and give the categories overrides for those roles.
