Manual:User rights

User rights are permissions (like the ability to edit pages or to block users) that can be assigned to different user groups. MediaWiki ships with a default set of user rights and user groups, but these can be customized. This page explains the default rights and groups and how to customize them.

For information about how to add and remove individual wiki users from groups, see  and .

Changing group permissions
A default MediaWiki installation assigns certain rights to default groups (see below).

You can change the default rights by editing the  array in  with the syntax.

If a member has multiple groups, they get all of the permissions from each of the groups they are in.

All users, including anonymous users, are in the  group; all registered users are in the   group.

In addition to the default groups, you can arbitrarily create new groups using the same array.

Examples
This example will disable viewing of all pages not listed in , then re-enable for registered users only:

This example will disable editing of all pages, then re-enable for users with 1>Special:MyLanguage/Manual:$wgEmailAuthentication|confirmed email addresses only:

Creating a new group and assigning permissions to it
You can create new user groups by defining permissions for the according group name in  where  is the actual name of the group.

Additionally to assigning permissions, you should create these three wiki pages with fitting content:


 * (content: )
 * (content: )
 * (content: )

By default, bureaucrats can add users to, or remove them from, any group.

However, if you are using  and , you may need to customize those instead.

Examples
This example will create an arbitrary “projectmember” group that can block users and delete pages, and whose edits are hidden by default in the recent changes log:

<span class="mw-headline" id="List_of_permissions">List of permissions [ edit ]
The following user rights are available in the latest version of MediaWiki.

If you are using an older version, look at “Special:Version” on your wiki and see if your version is covered in the “Versions” column.

List of groups
The following groups are available in the latest version of MediaWiki.

If you are using an older version then some of these may not be implemented.

From MW 1.12, you can create your own groups into which users are automatically promoted (as with autoconfirmed and emailconfirmed) using <tvar|AutoPromote></>.

You can even create any custom group by just assigning rights to them.

Default rights
The default rights are defined in <tvar|DefaultSettings></>.


 * Default values in HEAD version: https://phabricator.wikimedia.org/diffusion/MW/browse/master/includes/DefaultSettings.php


 * The default values in the latest stable MediaWiki release, version, are available here: https://phabricator.wikimedia.org/diffusion/MW/browse//includes/DefaultSettings.php


 * Additional rights: you should be able to list all the permissions available on your wiki by running <tvar|getAllRights> </>.

Adding new rights
'' Information for coders only follows. ''

If you're adding a new right in core, for instance to man>Special:MyLanguage/Manual:Special pages</>|control a new special page, you are required to add it to the list of available rights in <tvar|User></>, <tvar|1> </> ([<tvar|url>https://gerrit.wikimedia.org/r/#/c/135312/73/includes/User.php</> example]).

If you're, you instead need to use <tvar|AvailableRights></>.

You probably also want to assign it to some user group by editing <tvar|GroupPermissions></> described above.

If you want this right to be accessible to external applications by <tvar|OAuth></> or by botpasswords>Special:MyLanguage/Manual:Bot passwords</>|bot passwords, then you will need to add it to a grant by editing <tvar|GrantPermissions></>.

53

You also need to add  and   interface messages to /languages/i18n/en.json (with documentation in qqq.json).

The right-* messages can be seen on Special:ListGroupRights and the action-* messages are used in a sentence like "You do not have permission to ...".