BirthdayBalloonsSmall.png The New Zealand Connections Wiki delivers information about Internet and Phone services...
... and now that we're one, we want to know what you think of our new Comparison pages!

Help:User rights

From New Zealand Connections

Jump to: navigation, search

User rights are specific access and ability permissions that can be assigned to customizable groups, which can then be assigned to (or removed from) users through the Special:Userrights interface. For example, the default bureaucrat group enables the use of the User rights interface.

This feature was introduced in MediaWiki 1.5; see setting user rights in MediaWiki on the Meta-wiki for earlier methods.

Contents

Changing group permissions

A default MediaWiki installation assigns certain rights to default groups (see below). You can change the default rights by editing the GroupPermissions array in LocalSettings. with the syntax <source lang="php">$wgGroupPermissions['group']['right'] = true /* or false */;</source>

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 White list Read, then re-enable for registered users only: <source lang="php"> $wgGroupPermissions['*']['read'] = false;

  1. The following line is not actually necessary, since it's in the defaults. Setting
  2. '*' to false doesn't disable rights for groups that have the right separately set
  3. 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">

  1. Disable for everyone

$wgGroupPermissions['*']['edit'] = false;

  1. Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.

$wgGroupPermissions['user']['edit'] = false;

  1. 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>

List of rights and groups

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.

Right Description Versions
Reading
read allows viewing pages (when set to false, override for specific pages with WhitelistRead).
1.5+
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 page titles. 1.5+
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. 1.6+
reupload-shared allows replacing images and files from a shared repository (if one is set up) with local files. 1.6+
upload_by_url allows uploading by entering the URL of an external image. 1.8+
Management
delete allows the deletion of edits and pages. 1.5+
undelete allows viewing and restoring deleted edits and pages.
deletedhistory allows viewing deleted revisions, but not restoring. 1.6+
mergehistory allows access to Special:MergeHistory, to merge non-overlapping pages.
Note: currently disabled on Wikimedia wikis.
1.12+
protect allows locking a page to prevent edits, and editing 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.
userrights allows the use of the user rights interface, which allows the assignment or removal of groups to any user. 1.5+
rollback allows one-click reversion of edits. 1.5+
markbotedits allow rollback to be marked as bot edits (see m:Help:Administration#Rollback). 1.12+
patrol allows marking edits as legitimate (must be true). 1.5+
editinterface allows editing the MediaWiki namespace, which contains. 1.5+
editusercssjs allows editing user's monobook.css, monobook.js, ... subpages. 1.12+
Administration
siteadmin allows locking and unlocking the database (which blocks all interactions with the web site except viewing). 1.5+
import allows user to import pages from another wiki. 1.5+
importupload allows user to import pages from XML files. 1.5+
trackback allows removal of trackbacks (if UseTrackbacks is true). 1.7+
unwatchedpages allows access to Special:Unwatchedpages, which lists pages that no user has watchlisted. 1.6+
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 ("&action=purge").
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).
ipblock-exempt makes user immune to blocks applied to his IP address.
proxyunbannable makes user immune to the open proxy blocker, which is disabled by default. 1.7+
autopatrol automatically marks all edits by the user as patrolled (must be true).

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.

Group Description Versions
* all users (including anonymous). 1.5+
user registered accounts. 1.5+
autoconfirmed registered accounts at least as old as AutoConfirmAge and having at least as many edits as AutoConfirmCount. 1.6+
emailconfirmed registered accounts with confirmed email addresses. 1.7+
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+

Note that the 'developer' group is obsolete and should no longer be used.

Default rights

The default rights are defined in DefaultSettings.php. MediaWiki 1.12alpha defines the following (for older versions see GroupPermissions). <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
*/


* 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.
*/

See also

Personal tools