Help:User rights
User rights are specific access and ability permissions that can be assigned to customizable groups. Groups can then be assigned to (or removed from) users through the Special:Userrights interface in the wiki software. See Help:Assigning permissions.
Access to this interface is itself governed by the 'userrights' right, so only users in the 'bureaucrat' group can do it (in a default set-up) See Manual:User rights management for information about managing and the assignment of user groups.
This Special:Userrights interface was introduced in MediaWiki 1.5; see Manual:User rights management for earlier methods.
Changing group permissions
A default MediaWiki installation assigns certain rights to default groups (see below). You can change the default rights by editing the Template:Mediawiki in Template:Mediawiki with the syntax <source lang="php">$wgGroupPermissions['group']['right'] = true /* or false */;</source>
(Note: by default install wgGroupPermissions may not be present and you will need to add it into the file)
If a member has multiple groups, they get the highest permission of any groups. All users, including anonymous users, are in the '*'
group; all registered users are in the 'user'
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 $wgWhitelistRead, then re-enable for registered users only: <source lang="php"> $wgGroupPermissions['*']['read'] = false;
- The following line is not actually necessary, since it's in the defaults. Setting
- '*' to false doesn't disable rights for groups that have the right separately set
- to true!
$wgGroupPermissions['user']['read'] = true; </source>
This example will disable editing of all pages, then re-enable for users with confirmed e-mail addresses only: <source lang="php">
- Disable for everyone.
$wgGroupPermissions['*']['edit'] = false;
- Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit'] = false;
- Make it so users with confirmed e-mail addresses are in the group.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
- Hide group from user list.
$wgImplicitGroups[] = 'emailconfirmed';
- Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true; </source>
This example will create an arbitrary "ninja" group that can block users and delete pages, and whose edits are hidden by default in the recent changes log: <source lang="php"> $wgGroupPermissions['ninja']['bot'] = true; $wgGroupPermissions['ninja']['block'] = true; $wgGroupPermissions['ninja']['delete'] = true; </source>
In this example, you would probably also want to create pages MediaWiki:Group-ninja (content: ninjas
), MediaWiki:Group-ninja-member (content: ninja
), and MediaWiki:Grouppage-ninja (content: Project:Ninjas
).
List of permissions
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.
Template:Hl2 | Right | Template:Hl2 | Description | Template:Hl2 | Versions |
---|---|---|
Template:Hl3 colspan="3" | Reading | ||
read | allows viewing pages (when set to false, override for specific pages with $wgWhitelistRead).
|
1.5+ |
Template:Hl3 colspan="4"| Editing | ||
edit | allows editing unprotected pages. | 1.5+ |
createpage | allows the creation of new pages (requires the edit right). | 1.6+ |
createtalk | allows the creation of new talk pages (requires the edit right). | 1.6+ |
move | allows renaming the titles of unprotected pages (requires the edit right). | 1.5+ |
movefile | allows renaming pages in the "File" namespace (requires the move right and $wgAllowImageMoving to be true). | 1.14+ |
move-subpages | move subpages along with page (requires the move right). | 1.13+ |
move-rootuserpages | can move root pages in the "User" namespace (requires the move right). | 1.14+ |
createaccount | allows the creation of new user accounts. | 1.5+ |
upload | allows the creation of new images and files. | 1.5+ |
reupload | allows overwriting existing images and files (requires the upload right). | 1.6+ |
reupload-own | allows overwriting existing images and files uploaded by oneself (requires the upload right). | 1.11+ |
reupload-shared | allows replacing images and files from a shared repository (if one is set up) with local files (requires the upload right). | 1.6+ |
upload_by_url | allows uploading by entering the URL of an external image (requires the upload right). | 1.8+ |
editprotected | allows to edit protected pages (without cascading protection). | 1.13+ |
Template:Hl3 colspan="4"| Management | ||
delete | 1.5–1.11: allows the deletion or undeletion of pages. 1.12+: allows the deletion of pages. For undeletions, there is now the 'undelete' right, see below. |
1.5+ |
bigdelete | allows deletion of pages with larger than $wgDeleteRevisionsLimit revisions | 1.12+ |
deletedhistory | allows viewing deleted revisions, but not restoring. | 1.6+ |
undelete | allows the undeletion of pages. | 1.12+ |
browsearchive | allows prefix searching for titles of deleted pages through Special:Undelete. | 1.13+ |
mergehistory | allows access to Special:MergeHistory, to merge non-overlapping pages. Note: currently disabled by default, including on Wikimedia projects. |
1.12+ |
protect | allows locking a page to prevent edits and moves, and editing or moving locked pages. | 1.5+ |
block | allows the blocking of IP addresses, CIDR ranges, and registered users. Block options include preventing editing and registering new accounts, and autoblocking other users on the same IP address. | 1.5+ |
blockemail | allows preventing use of the Special:Emailuser interface when blocking. | 1.11+ |
hideuser | allows hiding the user/IP from the block log, active block list, and user list when blocking. (not available by default) | 1.10+ |
userrights | allows the use of the user rights interface, which allows the assignment or removal of all* groups to any user. * With $wgAddGroups and $wgRemoveGroups you can set the possibility to add/remove certain groups instead of all. |
1.5+ |
userrights-interwiki | allows changing user rights on other wikis. | 1.12+ |
rollback | allows one-click reversion of edits. | 1.5+ |
markbotedits | allows rollback to be marked as bot edits (see Manual:Administrators#Rollback). | 1.12+ |
patrol | allows marking edits as legitimate ($wgUseRCPatrol must be true). | 1.5+ |
editinterface | allows editing the MediaWiki namespace, which contains interface messages. | 1.5+ |
editusercssjs | allows editing *.css / *.js subpages of any user. Split into editusercss and edituserjs in 1.16 but retained for backward compatibility. | 1.12+ |
editusercss | allows editing *.css subpages of any user. | 1.16+ |
edituserjs | allows editing *.js subpages of any user. | 1.16+ |
suppressrevision | allows preventing deleted revision information from being viewed by sysops and prevents sysops from undeleting the hidden info. Prior to 1.13 this right was named hiderevision (not available by default) | 1.6+ |
deleterevision | allows deleting/undeleting information (revision text, edit summary, user who made the edit) of specific revisions (not available by default) | 1.6+ |
Template:Hl3 colspan="3"| Administration | ||
siteadmin | allows locking and unlocking the database (which blocks all interactions with the web site except viewing). Deprecated by default. | 1.5+ |
import | allows user to import one page per time from another wiki ("transwiki"). | 1.5+ |
importupload | allows user to import several pages per time from XML files. This right was called 'importraw' in and before version 1.5. | 1.5+ |
trackback | allows removal of trackbacks (if $wgUseTrackbacks is true). | 1.7+ |
unwatchedpages | allows access to Special:Unwatchedpages, which lists pages that no user has watchlisted. | 1.6+ |
Template:Hl3 colspan="3"| Technical | ||
bot | hides edits from recent changes lists and watchlists by default (can optionally be viewed). | 1.5+ |
purge | allows purging a page without a confirmation step (URL parameter "&action=purge ").
|
1.10+ |
minoredit | allows marking an edit as 'minor'. | 1.6+ |
nominornewtalk | blocks new message notification when making minor edits to user talk pages (requires minor edit right). | 1.9+ |
noratelimit | not affected by rate limits (prior to the introduction of this right, the configuration variable $wgRateLimitsExcludedGroups was used for this purpose) | 1.13+ |
ipblock-exempt | makes user immune to blocks applied to his IP address or a range (CIDR) containing it. | 1.9+ |
proxyunbannable | makes user immune to the open proxy blocker, which is disabled by default ($wgBlockOpenProxies). | 1.7+ |
autopatrol | automatically marks all edits by the user as patrolled ($wgUseRCPatrol must be true). | 1.9+ |
apihighlimits | allows user to use higher limits for API queries | 1.12+ |
writeapi | controls access to the write API ($wgEnableWriteAPI must be true) | 1.13+ |
suppressredirect | Allows moving a page without automatically creating a redirect. | 1.12+ |
autoconfirmed | used for the 'autoconfirmed' group, see the other table below for more information. | 1.6+ |
emailconfirmed | used for the 'emailconfirmed' group, see the other table below for more information. | 1.7 - 1.13 |
Although these permissions all control separate things, sometimes to perform certain actions you need multiple permissions. For example allowing people to edit but not read pages doesn't make sense, since in order to edit a page you must first be able to read it (Assuming no pages are whitelisted). Allowing uploads but not editing does not make sense since in order to upload an image you must implicitly create an image description page, etc. none |
{{{3}}} |
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.
Template:Hl2 | Group | Template:Hl2 | Description | Template:Hl2 | Versions |
---|---|---|
* | all users (including anonymous). | 1.5+ |
user | registered accounts. | 1.5+ |
autoconfirmed | registered accounts at least as old as $wgAutoConfirmAge and having at least as many edits as $wgAutoConfirmCount. | 1.6+ |
emailconfirmed | registered accounts with confirmed email addresses. | 1.7 - 1.13 |
bot | accounts with the bot right (intended for automated scripts). | 1.5+ |
sysop | users who by default can delete and restore pages, block and unblock users, et cetera. | 1.5+ |
bureaucrat | users who by default can change other users' rights. | 1.5+ |
developer | A group for the 'siteadmin' right. The group is deprecated by default, as well as the right. | 1.5 |
From MW 1.12, you can create your own groups into which users are automatically promoted (as with autoconfirmed and emailconfirmed) using $wgAutopromote.
Default rights
The default rights are defined in DefaultSettings.php.
- Default values in trunk version: DefaultSettings.php
- Default values in MediaWiki latest stable version 1.16.0:
<source lang="php"> /**
* Permission keys given to users in each group. * All users are implicitly in the '*' group including anonymous visitors; * logged-in users are all implicitly in the 'user' group. These will be * combined with the permissions of all groups that a given user is listed * in in the user_groups table. * * Note: Don't set $wgGroupPermissions = array(); unless you know what you're * doing! This will wipe all permissions, and may mean that your users are * unable to perform certain essential tasks or access new functionality * when new permissions are introduced and default grants established. * * Functionality to make pages inaccessible has not been extensively tested * for security. Use at your own risk! * * This replaces wgWhitelistAccount and wgWhitelistEdit */
$wgGroupPermissions = array();
// Implicit group for all visitors $wgGroupPermissions['*']['createaccount'] = true; $wgGroupPermissions['*']['read'] = true; $wgGroupPermissions['*']['edit'] = true; $wgGroupPermissions['*']['createpage'] = true; $wgGroupPermissions['*']['createtalk'] = true; $wgGroupPermissions['*']['writeapi'] = true; //$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
// Implicit group for all logged-in accounts $wgGroupPermissions['user']['move'] = true; $wgGroupPermissions['user']['move-subpages'] = true; $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages //$wgGroupPermissions['user']['movefile'] = true; // Disabled for now due to possible bugs and security concerns $wgGroupPermissions['user']['read'] = true; $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['user']['createpage'] = true; $wgGroupPermissions['user']['createtalk'] = true; $wgGroupPermissions['user']['writeapi'] = true; $wgGroupPermissions['user']['upload'] = true; $wgGroupPermissions['user']['reupload'] = true; $wgGroupPermissions['user']['reupload-shared'] = true; $wgGroupPermissions['user']['minoredit'] = true; $wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok" $wgGroupPermissions['user']['sendemail'] = true;
// Implicit group for accounts that pass $wgAutoConfirmAge $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
// Users with bot privilege can have their edits hidden // from various log pages by default $wgGroupPermissions['bot']['bot'] = true; $wgGroupPermissions['bot']['autoconfirmed'] = true; $wgGroupPermissions['bot']['nominornewtalk'] = true; $wgGroupPermissions['bot']['autopatrol'] = true; $wgGroupPermissions['bot']['suppressredirect'] = true; $wgGroupPermissions['bot']['apihighlimits'] = true; $wgGroupPermissions['bot']['writeapi'] = true;
- $wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled
// Most extra permission abilities go to this group $wgGroupPermissions['sysop']['block'] = true; $wgGroupPermissions['sysop']['createaccount'] = true; $wgGroupPermissions['sysop']['delete'] = true; $wgGroupPermissions['sysop']['bigdelete'] = true; // can be separately configured for pages with > $wgDeleteRevisionsLimit revs $wgGroupPermissions['sysop']['deletedhistory'] = true; // can view deleted history entries, but not see or restore the text $wgGroupPermissions['sysop']['deletedtext'] = true; // can view deleted revision text $wgGroupPermissions['sysop']['undelete'] = true; $wgGroupPermissions['sysop']['editinterface'] = true; $wgGroupPermissions['sysop']['editusercss'] = true; $wgGroupPermissions['sysop']['edituserjs'] = true; $wgGroupPermissions['sysop']['import'] = true; $wgGroupPermissions['sysop']['importupload'] = true; $wgGroupPermissions['sysop']['move'] = true; $wgGroupPermissions['sysop']['move-subpages'] = true; $wgGroupPermissions['sysop']['move-rootuserpages'] = true; $wgGroupPermissions['sysop']['patrol'] = true; $wgGroupPermissions['sysop']['autopatrol'] = true; $wgGroupPermissions['sysop']['protect'] = true; $wgGroupPermissions['sysop']['proxyunbannable'] = true; $wgGroupPermissions['sysop']['rollback'] = true; $wgGroupPermissions['sysop']['trackback'] = true; $wgGroupPermissions['sysop']['upload'] = true; $wgGroupPermissions['sysop']['reupload'] = true; $wgGroupPermissions['sysop']['reupload-shared'] = true; $wgGroupPermissions['sysop']['unwatchedpages'] = true; $wgGroupPermissions['sysop']['autoconfirmed'] = true; $wgGroupPermissions['sysop']['upload_by_url'] = true; $wgGroupPermissions['sysop']['ipblock-exempt'] = true; $wgGroupPermissions['sysop']['blockemail'] = true; $wgGroupPermissions['sysop']['markbotedits'] = true; $wgGroupPermissions['sysop']['apihighlimits'] = true; $wgGroupPermissions['sysop']['browsearchive'] = true; $wgGroupPermissions['sysop']['noratelimit'] = true; $wgGroupPermissions['sysop']['versiondetail'] = true; $wgGroupPermissions['sysop']['movefile'] = true;
- $wgGroupPermissions['sysop']['mergehistory'] = true;
// Permission to change users' group assignments $wgGroupPermissions['bureaucrat']['userrights'] = true; $wgGroupPermissions['bureaucrat']['noratelimit'] = true; // Permission to change users' groups assignments across wikis
- $wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
// Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
- $wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
- $wgGroupPermissions['sysop']['deleterevision'] = true;
// To hide usernames from users and Sysops
- $wgGroupPermissions['suppress']['hideuser'] = true;
// To hide revisions/log items from users and Sysops
- $wgGroupPermissions['suppress']['suppressrevision'] = true;
// For private suppression log access
- $wgGroupPermissions['suppress']['suppressionlog'] = true;
/**
* The developer group is deprecated, but can be activated if need be * to use the 'lockdb' and 'unlockdb' special pages. Those require * that a lock file be defined and creatable/removable by the web * server. */
- $wgGroupPermissions['developer']['siteadmin'] = true;
</source>
See also
- Help:Assigning permissions - help page describing use of the Special:Userrights interface (for bureaucrats)
- Manual:User rights management - information about managing and the assignment of user groups.
- Manual:$wgNamespaceProtection
- Manual:$wgAutopromote
- Manual:Preventing access (examples)
- Category:User rights extensions - Many extensions relating to user rights