Manual:User rights/mnw

From mediawiki.org
This page is a translated version of the page Manual:User rights and the translation is 6% complete.

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 Help:User rights and groups and Manual:Setting user groups in MediaWiki .

Changing group permissions

A default MediaWiki installation assigns certain rights to default groups (see below). You can change the default rights by editing the $wgGroupPermissions array in LocalSettings.php with the syntax.

$wgGroupPermissions['group']['right'] = true /* or false */;
In a default installation $wgGroupPermissions will be set in includes/DefaultSettings.php, but it is not present in LocalSettings.php. You will then need to add it in that file.

If a member has multiple groups, they get all 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 'user' group. In addition to the default groups, you can arbitrarily create new groups using the same array.

ဥပမာဂမၠိုၚ်

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

$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;

This example will disable editing of all pages, then re-enable for users with confirmed email addresses only:

# 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 email 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;

Creating a new group and assigning permissions to it

You can create new user groups by defining permissions for the according group name in $wgGroupPermissions[ 'group-name' ] where group-name is the actual name of the group.

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

  • MediaWiki:Group-<group-name> (content: Name of the group)
  • MediaWiki:Group-<group-name>-member (content: Name of a member of the group)
  • MediaWiki:Grouppage-<group-name> (content: Name of the group page)

By default, bureaucrats can add users to, or remove them from, any group. However, if you are using Manual:$wgAddGroups and Manual:$wgRemoveGroups , you may need to customize those instead.

ဥပမာဂမၠိုၚ်

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:

$wgGroupPermissions['projectmember']['bot'] = true;
$wgGroupPermissions['projectmember']['block'] = true;
$wgGroupPermissions['projectmember']['delete'] = true;
The group name cannot contain spaces, so use 'random-group' or 'random_group' instead of 'random group'. Moreover it is recommended to only use lowercase letters to create a group.

In this example, you would probably also want to create these pages:

  • MediaWiki:Group-projectmember (content: Project members)
  • MediaWiki:Group-projectmember-member (content: Project member)
  • MediaWiki:Grouppage-projectmember (content: Project:Project Members)

This will ensure that the group will be referred to as "Project members" throughout the interface, and a member will be referred to as a "Project member", and overviews will link the group name to Project:Project members.

This example disables write access (page editing and creation) by default, creates a group named "writer", and grants it write access. Users can be manually added to this group via Special:UserRights:

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['user']['createpage'] = false;
$wgGroupPermissions['writer']['edit'] = true;
$wgGroupPermissions['writer']['createpage'] = true;

In this example, you would probably also want to create these pages:

  • MediaWiki:Group-writer (content: Writers)
  • MediaWiki:Group-writer-member (content: Writer)
  • MediaWiki:Grouppage-writer (content: Project:Write)

Removing predefined groups

MediaWiki out of the box comes with a number of predefined groups. Most of these groups can be removed by unsetting the according array keys, among them $wgGroupPermissions[ '<group-name>' ]. For details, see below.

ဥပမာဂမၠိုၚ်

This example will eliminate the bureaucrat group entirely. It is necessary to ensure that all six of these variables are unset for any group that one wishes to remove from being listed at Special:ListGroupRights; however, merely unsetting $wgGroupPermissions will suffice to remove it from Special:UserRights. This code should be placed after any require_once lines that add extensions, such as Extension:AntiSpoof containing code that gives bureaucrats group permissions by default.

unset( $wgGroupPermissions['bureaucrat'] );
unset( $wgRevokePermissions['bureaucrat'] );
unset( $wgAddGroups['bureaucrat'] );
unset( $wgRemoveGroups['bureaucrat'] );
unset( $wgGroupsAddToSelf['bureaucrat'] );
unset( $wgGroupsRemoveFromSelf['bureaucrat'] );

In some extensions (Flow, Semantic MediaWiki, etc.), rights are added during extension registration or in a registration function. In this case, it could be necessary to use a registration function in LocalSettings.php to remove some predefined user groups:

$wgExtensionFunctions[] = function() use ( &$wgGroupPermissions ) {
    unset( $wgGroupPermissions['oversight'] );
    unset( $wgGroupPermissions['flow-bot'] );
};


Note on the group called "user"

With the above mechanism, you can remove the groups sysop, bureaucrat and bot, which - if used - can be assigned through the usual user permission system. However, it is currently impossible to remove the user group. This group is not assigned through the usual permission system. Instead, every logged-in user automatically is a member of that group. This is hardcoded in MediaWiki and currently cannot be changed easily.

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.

ပုၚ် ပွံက် User groups that have this right by default Versions
ပွမဗှ်ဒၟံၚ်
read မုက်လိက်ဍာံတအ် - when set to false, override for specific pages with $wgWhitelistRead
Warning Warning: Setting the user right "read" (allow viewing pages) to false will only protect wiki (article, talk, ...) pages, but uploaded files (images, files, docs... in the $wgUploadPath subdirectories) will always remain readable via direct access by default.
Use the information from Manual:Image authorization and img_auth.php pages when you have the need to restrict image views and file download access to only logged-in users.
*, user 1.5+
ပလေဝ်ဒါန်ဒၟံၚ်
applychangetags Apply tags along with one's changes - requires the edit right user 1.25+
autocreateaccount ပြင်ပအသုံးပြုသူ အကောင့်တစ်ခုဖြင့် အလိုအလျောက် အကောင့်ထဲ ဝင်ရန် - a more limited version of createaccount 1.27+
createaccount ခၞံကၠောန် အကံက် ညးလွပ်ဏအ် - register / registration *, sysop 1.5+
createpage စာမျက်နှာများကို ဖန်တီးရန် (ဆွေးနွေးချက်စာမျက်နှာများမဟုတ်) - မနွံပၟိက်ကဵု edit အခေါၚ် *, user 1.6+
createtalk ခၞံကၠောန်မုက်လိက်မသဳကၠဳတအ် - မနွံပၟိက်ကဵု edit အခေါၚ် *, user 1.6+
delete-redirect Delete single revision redirects (note that this is not needed if the group already has the delete right) 1.36+
edit မုက်လိက်မဒါန်တအ် *, user 1.5+
editsemiprotected "Allow only autoconfirmed users" အဖြစ်ကာကွယ်ထားသော စာမျက်နှာများကိုပြင်ဆင်ရန် - without cascading protection - requires the edit right autoconfirmed, bot, sysop 1.22+
editprotected "Allow only administrators" အဖြစ်ကာကွယ်ထားသော စာမျက်နှာများကိုပြင်ဆင်ရန် - without cascading protection - requires the edit right sysop 1.13+
minoredit သမ္တီညးဒါန်ဂမၠိုၚ် နဒဒှ်အပဓာန - requires the edit right user 1.6+
move ပဆုဲမုက်လိက်ဂမၠိုၚ် - requires the edit right user, sysop 1.5+
move-categorypages ပဆုဲမုက်လိက်ကဏ္ဍတအ် - requires the move right user, sysop 1.25+
move-rootuserpages ပဆုဲတမ်ရိုဟ်မုက်လိက်ညးလွပ် - requires the move right user, sysop 1.14+
move-subpages ပဆုဲမုက်လိက်ဂမၠိုၚ်သီုကဵုမုက်လိက်လစှ်ေဍေံတအ်ဂမၠိုၚ် - requires the move right user, sysop 1.13+
movefile ပဆုဲဝှာၚ်တအ် - requires the move right and $wgAllowImageMoving to be true user, sysop 1.14+
reupload ထပ်ချူအာ ဝှာၚ်နွံမံင်တုဲဏအ် - requires the upload right user, sysop 1.6+
reupload-own သင်ကိုယ်တိုင် Upload တင်ထားခဲ့သည့် ရှိပြီးသားဖိုင်ကို ထပ်ရေးရန် - requires the upload right (note that this is not needed if the group already has the reupload right) 1.11+
reupload-shared Override files on the shared media repository locally - (if one is set up) with local files (requires the upload right) user, sysop 1.6+
sendemail အခြားအသုံးပြုသူများကို အီးမေးပို့ရန် user 1.16+
upload ပတိုန်ပၠောပ် ဝှာင် - requires the edit right and $wgEnableUploads to be true user, sysop 1.5+
upload_by_url ပတိုန်ပၠောပ် ဝှာၚ် နူ URL - requires the upload right (Prior to 1.20 it was given to sysops) 1.8+
<span id="Management">Management
bigdelete လွန်စွာများပြားသော ရာဇဝင်များရှိသည့် စာမျက်နှာများကို ဖျက်ရန် (as determined by $wgDeleteRevisionsLimit ) - requires the delete right sysop 1.12+
block အခြားအသုံးပြုသူများ တည်းဖြတ်ခြင်းမှ ပိတ်ပင်ရန် - Block options include preventing editing and registering new accounts, and autoblocking other users on the same IP address sysop 1.5+
blockemail အီးမေးပို့ခြင်းမှ အသုံးပြုသူကို တားဆီးရန် သို့မဟုတ် တားဆီးထားခြင်း ပြန်ဖွင့်ပါ - allows preventing use of the Special:Emailuser interface when blocking - requires the block right sysop 1.11+
browsearchive ဖျက်ပစ်လိုက်သော စာမျက်နှာများကို ရှာရန် - through Special:Undelete - requires the deletedhistory right sysop 1.13+
changetags Add and remove arbitrary tags on individual revisions and log entries - currently unused by extensions user 1.25+
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
sysop 1.5+
deletedhistory View deleted history entries, without their associated text sysop 1.6+
deletedtext View deleted text and changes between deleted revisions sysop
deletelogentry Delete and undelete specific log entries - allows deleting/undeleting information (action text, summary, user who made the action) of specific log entries - requires the deleterevision right suppress 1.20+
deleterevision Delete and undelete specific revisions of pages - allows deleting/undeleting information (revision text, edit summary, user who made the edit) of specific revisions Split into deleterevision and deletelogentry in 1.20 suppress 1.6+
editcontentmodel စာမျက်နှာ၏ မာတိကာမော်ဒယ်ကို ပြင်ဆင်ရန် - requires the edit right user 1.23.7+
editinterface Edit the user interface - contains interface messages. For editing sitewide CSS/JSON/JS, there are now segregate rights, see below. - requires the edit right sysop, interface-admin 1.5+
editmyoptions သင်၏ကိုယ်ပိုင် အပြင်အဆင်များကို ပြင်ရန် * 1.22+
editmyprivateinfo သင်၏ကိုယ်ပိုင် ပုဂ္ဂလိကဒေတာကို ပြင်ရန် (ဥပမာ - အီးမေးလ်လိပ်စာ၊ နာမည်ရင်း) နှင့် စကားဝှက်ပြန်လည်သတ်မှတ်သည့် အီးမေးလ် တောင်းဆိုရန် - also hides the "Change Password", but not other ways to change the password - requires the viewmyprivateinfo right * 1.22+
editmyusercss Edit your own user CSS files - prior to 1.31 it was assigned to everyone (i.e. "*") (note that this is not needed if the group already has the editusercss right) - requires the edit right user 1.22+
editmyuserjs Edit your own user JavaScript files - prior to 1.31 it was assigned to everyone (i.e. "*") (note that this is not needed if the group already has the edituserjs right) - requires the edit right user 1.22+
editmyuserjsredirect Edit your own user JavaScript files that are redirects (note that this is not needed if the group already has the edituserjs right) - requires the edit right 1.34+
editmyuserjson Edit your own user JSON files (note that this is not needed if the group already has the edituserjson right) - requires the edit right user 1.31+
editmywatchlist သင့်ကိုယ်ပိုင် စောင့်ကြည့်စာရင်းကို တည်းဖြတ်ခြင်း (အချို့သောလုပ်ဆောင်ချက်များသည် ဤအခွင့်အရေးမရှိဘဲ စာမျက်နှာများကို ဆက်လက်ထည့်သွင်းနေမည်ကို သတိပြုပါ) - requires the viewmywatchlist right * 1.22+
editsitecss Edit sitewide CSS - requires the editinterface right interface-admin 1.32+
editsitejs Edit sitewide JavaScript - requires the editinterface right interface-admin 1.32+
editsitejson Edit sitewide JSON - requires the editinterface right sysop, interface-admin 1.32+
editusercss အခြားအသုံးပြုသူများ၏ CSS ဖိုင်ကို တည်းဖြတ်ရန် - requires the edit right interface-admin 1.16+
edituserjs အခြားအသုံးပြုသူများ၏ JavaScript ဖိုင်ကို တည်းဖြတ်ရန် - requires the edit right interface-admin 1.16+
edituserjson အခြားအသုံးပြုသူများ၏ JSON ဖိုင်ကို တည်းဖြတ်ရန် - requires the edit right sysop, interface-admin 1.31+
hideuser အသုံးပြုသူအမည်ကို ပိတ်ပင်ရန် သို့ မပိတ်ပင်တော့ရန်နှင့် ယင်းအမည်ကို အများမမြင်နိုင်အောင် ဝှက်ထားရန် သို့ မဝှက်တော့ရန် - Only users with 1000 edits or less can be suppressed by default - requires the block right

Use $wgHideUserContribLimit to disable.

suppress 1.10+
markbotedits နောက်ပြန်ပြင်သော တည်းဖြတ်မှုများကို ဘော့တည်းဖြတ်မှုအဖြစ် မှတ်သားရန် - see Manual:Rollback - requires the rollback right sysop 1.12+
mergehistory စာမျက်နှာများ၏ရာဇဝင်များကို ပေါင်းရန် - requires the edit right sysop 1.12+
pagelang စာမျက်နှာ ဘာသာစကား ပြောင်းလဲရန် - $wgPageLanguageUseDB must be true 1.24+
patrol အခြားသူများ၏ တည်းဖြတ်မှုများကို စောင့်ကြပ်စစ်ဆေးပြီးကြောင်း မှတ်သားခြင်း - $wgUseRCPatrol must be true sysop 1.5+
patrolmarks View recent changes patrol marks 1.16+
protect ကာကွယ်မှုအပြင်အဆင် ပြောင်းလဲရန်နှင့် သွယ်ဖြာ-ကာကွယ်ထားသည့် စာမျက်နှာများကို တည်းဖြတ်ရန် - requires the edit right sysop 1.5+
rollback Quickly rollback the edits of the last user who edited a particular page - requires the edit right sysop 1.5+
suppressionlog ကိုယ်ပိုင်မှတ်တမ်းများကို ကြည့်ရန် suppress 1.6+
suppressrevision View, hide and unhide specific revisions of pages from any user - Prior to 1.13 this right was named hiderevision - requires the deleterevision right suppress 1.6+
unblockself ကိုယ့်ကိုကိုယ် ပြန်မပိတ်ပင်ရန် - Without it, an administrator that has the capability to block cannot unblock themselves if blocked by another administrator sysop 1.17+
undelete စာမျက်နှာတစ်ခုကို မဖျက်တော့ရန် - requires the deletedhistory right sysop 1.12+
userrights ဒါန် အခေါၚ်အရာညးလွဟ်တအ်အလုံဖအိုတ် - 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

bureaucrat 1.5+
userrights-interwiki အခြားဝီကီများမှ အသုံးပြုသူများ၏ အသုံးပြုသူအခွင့်အရေးများကို တည်းဖြတ်ရန် - requires the userrights right 1.12+
viewmyprivateinfo သင်၏ကိုယ်ပိုင် ပုဂ္ဂလိကဒေတာကို ကြည့်ရန် (ဥပမာ - အီးမေးလ်လိပ်စာ၊ နာမည်ရင်း) * 1.22+
viewmywatchlist သင်၏ကိုယ်ပိုင် စောင့်ကြည့်စာရင်းကို ကြည့်ရန် * 1.22+
viewsuppressed View revisions hidden from any user - i.e. a more narrow alternative to "suppressrevision" (note that this is not needed if the group already has the suppressrevision right) suppress 1.24+
<span id="Administration">Administration
autopatrol တစ်စုံတစ်ဦး၏ တည်းဖြတ်မှုများအား စောင့်ကြပ်ကြည့်ရှုပြီးကြောင်း အလိုအလျောက်မှတ်သားခြင်း - $wgUseRCPatrol must be true bot, sysop 1.9+
deletechangetags Delete tags from the database - currently unused by extensions sysop 1.28+
import အခြားဝီကီများမှ စာမျက်နှာများကို ထည့်သွင်းရန် - "transwiki" - requires the edit right sysop 1.5+
importupload Upload တင်လိုက်သော ဖိုင်တစ်ခုမှ စာမျက်နှာများကို ထည့်သွင်းရန် - This right was called 'importraw' in and before version 1.5 - requires the edit right sysop 1.5+
managechangetags Create and (de)activate tags - currently unused by extensions sysop 1.25+
siteadmin Lock and unlock the database - which blocks all interactions with the web site except viewing. (not available by default) 1.5+
unwatchedpages စောင့်မကြည့်သော စာမျက်နှာများ၏ စာရင်းကို ကြည့်ရန် - lists pages that no user has watchlisted sysop 1.6+
<span id="Technical">Technical
apihighlimits Use higher limits in API queries bot, sysop 1.12+
autoconfirmed အိုင်ပီအခြေပြု ကန့်သတ်ချက်များကို အကျိုးမသက်ရောက်ပါ - used for the 'autoconfirmed' group, see the other table below for more information (note that this is not needed if the group already has the noratelimit right) autoconfirmed, bot, sysop 1.6+
bot အလိုအလျောက်ပြုမူသော ဖြစ်စဉ်အဖြစ်ဆောင်ရွက်ရန် - can optionally be viewed bot 1.5+
ipblock-exempt Bypass IP blocks, auto-blocks and range blocks sysop 1.9+
nominornewtalk Not have minor edits to discussion pages trigger the new messages prompt - requires the minoredit right bot 1.9+
noratelimit Not be affected by rate limits - not affected by rate limits (prior to the introduction of this right, the configuration variable $wgRateLimitsExcludedGroups was used for this purpose) sysop, bureaucrat 1.13+
override-export-depth Export pages including linked pages up to a depth of 5
With this right, you can define the depth of linked pages at Special:Export. Otherwise, the value of $wgExportMaxLinkDepth , which is 0 by default, will be used.
?
suppressredirect စာမျက်နှာများကို ရွှေ့သောအခါ မူရင်းစာမျက်နှာတို့မှ ပြန်ညွှန်းများ မဖန်တီးရန် - requires the move right bot, sysop 1.12+
writeapi အခေါင်အရာ ညးမချူ API - requires the edit right *, user, bot 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 allowlisted). 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.

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.

ဂကောံ ပွံက် Default rights Versions
* all users (including anonymous). createaccount, createpage, createtalk, edit, editmyoptions, editmyprivateinfo, editmywatchlist, read, viewmyprivateinfo, viewmywatchlist, writeapi 1.5+
temp Temporary user accounts (T330816) Similar to * group 1.41+
user registered accounts. applychangetags, changetags, createpage, createtalk, edit, editcontentmodel, editmyusercss, editmyuserjs, editmyuserjson, minoredit, move, move-categorypages, move-rootuserpages, move-subpages, movefile, purge, read, reupload, reupload-shared, sendemail, upload, writeapi
autoconfirmed registered accounts at least as old as $wgAutoConfirmAge and having at least as many edits as $wgAutoConfirmCount . autoconfirmed, editsemiprotected 1.6+
bot accounts with the bot right (intended for automated scripts). autoconfirmed, autopatrol, apihighlimits, bot, editsemiprotected, nominornewtalk, suppressredirect, writeapi 1.5+
sysop users who by default can delete and restore pages, block and unblock users, et cetera. apihighlimits, autoconfirmed, autopatrol, bigdelete, block, blockemail, browsearchive, createaccount, delete, deletedhistory, deletedtext, editinterface, editprotected, editsemiprotected, editsitejson, edituserjson, import, importupload, ipblock-exempt, managechangetags, markbotedits, mergehistory, move, move-categorypages, move-rootuserpages, move-subpages, movefile, noratelimit, patrol, protect, reupload, reupload-shared, rollback, suppressredirect, unblockself, undelete, unwatchedpages, upload 1.5+
interface-admin users who can edit sitewide CSS/JS. editinterface, editsitecss, editsitejs, editsitejson, editusercss, edituserjs, edituserjson 1.32+
bureaucrat users who by default can change other users' rights. noratelimit, userrights 1.5+
suppress deletelogentry, deleterevision, hideuser, suppressionlog, suppressrevision, viewsuppressed

From MW 1.12, you can create your own groups into which users are automatically promoted (as with autoconfirmed and emailconfirmed) using $wgAutopromote . You can even create any custom group by just assigning rights to them.

Default rights

The default rights are defined in DefaultSettings.php .

  • 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 1.41, are available here:

https://phabricator.wikimedia.org/diffusion/MW/browse/REL1_41/includes/DefaultSettings.php

  • Additional rights: you should be able to list all the permissions available on your wiki by running User::getAllRights().

Adding new rights

Information for coders only follows.

If you're adding a new right in core, for instance to control a new special page, you are required to add it to the list of available rights in PermissionManager.php , $coreRights (example). If you're doing so in an extension , you instead need to use $wgAvailableRights .

You probably also want to assign it to some user group by editing $wgGroupPermissions described above.

If you want this right to be accessible to external applications by OAuth or by bot passwords, then you will need to add it to a grant by editing $wgGrantPermissions .

// create projectmember-powers right
$wgAvailableRights[] = 'projectmember-powers';

// add projectmember-powers to the projectmember-group
$wgGroupPermissions['projectmember']['projectmember-powers'] = true;

// add projectmember-powers to the 'basic' grant so we can use our projectmember powers over an API request
$wgGrantPermissions['basic']['projectmember-powers'] = true;

You also need to add right-[name] and action-[name] 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 ...".

See also