मैनुअल:सदस्य अधिकार

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:User rights and the translation is 1% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎हिन्दी • ‎Bahasa Indonesia • ‎日本語 • ‎한국어 • ‎polski • ‎português do Brasil • ‎русский • ‎Tagalog • ‎中文

User rights are specific access and ability permissions that can be assigned to customizable user groups. Groups can then be assigned to (or removed from) users through the Special:UserRights special page. See Help:User rights and groupsHelp:User rights and groups.

Access to this interface is itself governed by the userrights right, so only users in the Bureaucrats group can do it (in a default set-up). See Manual:Setting user groups in MediaWikiManual:Setting user groups in MediaWiki for information about managing and the assignment of user groups.

Changing group permissions

A default MediaWiki installation assigns certain rights to default groups (see below). You can change the default rights by editing the $wgGroupPermissionsManual:$wgGroupPermissions array in LocalSettings.phpManual: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 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 '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 $wgWhitelistReadManual:$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:$wgAddGroupsManual:$wgAddGroups and Manual:$wgRemoveGroupsManual:$wgRemoveGroups, you may need to customize those instead.

Examples

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:

$wgGroupPermissions['ninja']['bot']    = true;
$wgGroupPermissions['ninja']['block']  = true;
$wgGroupPermissions['ninja']['delete'] = true;
Note: the group name cannot contain spaces, so use 'random-group' or 'random_group' instead of 'random group'

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

  • MediaWiki:Group-ninja (content: Ninjas)
  • MediaWiki:Group-ninja-member (content: ninja)
  • MediaWiki:Grouppage-ninja (content: Project:Ninjas)

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

This example disables write access (page editing and creation) by default, creates a group named "Write", 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['Write']['edit'] = true;
$wgGroupPermissions['Write']['createpage'] = true;

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

  • MediaWiki:Group-Write (content: Writers)
  • MediaWiki:Group-Write-member (content: Writer)
  • MediaWiki:Grouppage-Write (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.

Example

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:RenameuserExtension:Renameuser 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() {
	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 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.

Right Description User groups that have this right by default Versions
Reading
read पृष्ठ पढ़ें - when set to false, override for specific pages with $wgWhitelistReadManual:$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 Authorisation 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+
Editing
edit पृष्ठ सम्पादित करें *, user 1.5+
createpage पृष्ठ बनाएँ (जो चर्चा पृष्ठ नहीं हैं) - requires the edit right *, user 1.6+
createtalk वार्ता पृष्ठ बनाएँ - requires the edit right *, user 1.6+
move पृष्ठ स्थानांतरित करें - requires the edit right user 1.5+
movefile संचिकाएँ स्थानांतरित करें - requires the move right and $wgAllowImageMovingManual:$wgAllowImageMoving to be true user 1.14+
move-subpages पृष्ठ उपपृष्ठों सहित स्थानांतरीत करें - requires the move right user 1.13+
move-rootuserpages मूल सदस्य पृष्ठ स्थानांतरित करें - requires the move right user 1.14+
move-categorypages श्रेणी पृष्ठ स्थानांतरित करें - (requires the move right) user 1.25+
createaccount नये सदस्य खाते बनाएँ - register / registration * 1.5+
autocreateaccount बाहरी खाते से स्वतः प्रवेश - a more limited version of createaccount 1.27+
upload फ़ाइल अपलोड करें - requires the edit right user 1.5+
reupload मौजूदा फ़ाईलों पर पुनर्लेखन करें - requires the upload right user 1.6+
reupload-own स्वयं अपलोड की हुई फ़ाइल पर पुनर्लेखन करें - requires the reupload right (note that this is not needed if the group already has the reupload right) 1.11+
reupload-shared शेअर्ड इमेज भण्डार में मौजूद फ़ाइलों पर पुनर्लेखन करें - (if one is set up) with local files (requires the upload right) user 1.6+
upload_by_url यू॰आर॰एल से फ़ाइल अपलोड करें - requires the upload right 1.8+
editprotected उन सुरक्षित पृष्ठ सम्पादित करें जिनके सम्पादन की "Allow only administrators" - without cascading protection sysop 1.13+
editsemiprotected उन पृष्ठों को सम्पादित करें जिनका सुरक्षा स्तर है "Allow only autoconfirmed users" - without cascading protection autoconfirmed 1.22+
applychangetags प्रयोग में लाइये tags किसी के बदलाव के साथ। user 1.25+
sendemail अन्य सदस्यों को ई-मेल भेजें user 1.16+
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
sysop 1.5+
bigdelete अधिक इतिहास वाले पृष्ठ हटाएँ sysop 1.12+
deletedhistory हटाई गई इतिहास सूची, उसके साथ पाये जाने वाले पाठ के बिना देखें sysop 1.6+
deletedtext हटाया गया पाठ और हटाए गए अवतरणों के बीच अंतर देखें sysop
undelete पृष्ठ पुनर्स्थापित करें sysop 1.12+
browsearchive हटाए गए पृष्ठ खोजें - through Special:Undelete sysop 1.13+
mergehistory पृष्ठ इतिहास एकत्रित करें sysop 1.12+
protect सुरक्षा स्तर बदलें और सीढ़ी-सुरक्षित पृष्ठ सम्पादित करें sysop 1.5+
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 sysop 1.11+
hideuser सदस्यनाम ब्लॉक करें और उसे लोगों से छुपाएँ - (not available by default)

Only users with 1000 edits or less can be suppressed by default. Use $wgHideUserContribLimit to disable.

1.10+
unblockself स्वयं को अनावरुद्ध करें - Without it, an administrator that has the capability to block cannot unblock themselves if blocked by another administrator sysop 1.17+
userrights सभी सदस्य अधिकार बदलें - allows the assignment or removal of all* groups to any user.
* With $wgAddGroupsManual:$wgAddGroups and $wgRemoveGroupsManual:$wgRemoveGroups you can set the possibility to add/remove certain groups instead of all
bureaucrat 1.5+
userrights-interwiki अन्य विकियों पर सदस्य अधिकार बदलें 1.12+
rollback किसी पृष्ठ का अंतिम सम्पादन करने वाले सदस्य के सम्पादन वापिस लें sysop 1.5+
markbotedits वापिस लेने में हुए संपादनों को बॉट सम्पादन चिन्हित करें - see Manual:Administrators#Rollback sysop 1.12+
pagelang पृष्ठ भाषा बदलें - $wgPageLanguageUseDBManual:$wgPageLanguageUseDB must be true 1.24+
patrol अन्य सदस्यों के सम्पादन परीक्षित चिन्हित करें - $wgUseRCPatrolManual:$wgUseRCPatrol must be true sysop 1.5+
patrolmarks हाल में हुए बदलावों में परीक्षण चिन्ह देखें 1.16+
changetags जमा करो और हटाओ स्वतंत्र टैग व्यक्तिगत अवतरणों और लॉग प्रविक्तियों पर - currently unused by extensions user 1.25+
editcontentmodel एक पेज की सामग्री मॉडल को संपादित। 1.23.7+
editinterface सॉफ़्टवेयर इंटरफ़ेस सम्पादित करें - contains interface messages sysop 1.5+
editusercssjs ⧼right-editusercssjs⧽ - Split into editusercss and edituserjs in 1.16 and deprecated, removed in 1.29 1.12+
editusercss अन्य सदस्यों के सी॰एस॰एस पृष्ठ सम्पादित करें sysop 1.16+
edituserjs अन्य सदस्यों के जावास्क्रिप्ट पृष्ठ सम्पादित करें sysop 1.16+
editmyusercss अपनी सदस्य स्तर की सी॰एस॰एस फ़ाइलें सम्पादित करें * 1.22+
editmyuserjs अपनी सदस्य स्तर की जावास्क्रिप्ट फ़ाइलें सम्पादित करें * 1.22+
editmywatchlist अपनी ध्यानसूची सम्पादित करें। ध्यान दें कि कुछ कार्य इस अधिकार के बिना भी ध्यानसूची में पृष्ठ जोड़ेंगे। * 1.22+
viewmywatchlist अपनी ध्यानसूची देखें * 1.22+
editmyprivateinfo अपना व्यक्तिगत डाटा सम्पादित करें (जैसे ई-मेल पता, असली नाम) * 1.22+
viewmyprivateinfo अपना व्यक्तिगत डाटा देखें (जैसे ई-मेल पता, असली नाम) * 1.22+
editmyoptions अपनी वरीयताएँ सम्पादित करें * 1.22+
suppressrevision किसी भी सदस्य से छुपे हुए अवतरण देखें, छुपायें और पुनर्स्थापित करें - Prior to 1.13 this right was named hiderevision (not available by default) 1.6+
viewsuppressed देखें संशोधन किसी भी उपयोगकर्ता से छुपा। - i.e. a more narrow alternative to "suppressrevision" (not available by default) 1.24+
deletelogentry विशिष्ट लॉग प्रविष्टियाँ छुपाएँ और दिखाएँ - allows deleting/undeleting information (action text, summary, user who made the action) of specific log entries (not available by default) 1.20+
deleterevision पृष्ठों के विशिष्ट अवतरण हटाएँ एवं पुनर्स्थापित करें - allows deleting/undeleting information (revision text, edit summary, user who made the edit) of specific revisions Split into deleterevision and deletelogentry in 1.20 (not available by default) 1.6+
sendemail-new-users ⧼right-sendemail-new-users⧽ user 1.31+
Administration
siteadmin डाटाबेस को ताला लगायें या खोलें - which blocks all interactions with the web site except viewing. Disabled by default 1.5+
import अन्य विकियों से पृष्ठ आयात करें - "transwiki" sysop 1.5+
importupload फ़ाइल अपलोड द्वारा पृष्ठ आयात करें - This right was called 'importraw' in and before version 1.5 sysop 1.5+
trackback Obsolete. Allows removal of trackbacks (if $wgUseTrackbacksManual:$wgUseTrackbacks is true) 1.7 - 1.18
unwatchedpages ऐसे पृष्ठों की सूची देखें जो किसी की ध्यानसूची में नहीं हैं - lists pages that no user has watchlisted sysop 1.6+
managechangetags डेटाबेस से चिप्पियाँ बनायें और हटायें - currently unused by extenions sysop 1.25+
Technical
bot स्वचलित प्रणाली माने जाएँ - can optionally be viewed bot 1.5+
purge पृष्ठ की कैश मेमोरी खाली करें - URL parameter "&action=purge" user 1.10+
minoredit अपने बदलाव छोटे चिन्हित करें user 1.6+
nominornewtalk वार्ता पृष्ठों पर छोटे बदलाव करने पर सदस्यों को "आपके लिये नया सन्देश है" पट्टी न दिखाएँ - requires minor edit right bot 1.9+
noratelimit रेट लिमिट्स से बेअसर हों - not affected by rate limits (prior to the introduction of this right, the configuration variable $wgRateLimitsExcludedGroupsManual:$wgRateLimitsExcludedGroups was used for this purpose) sysop, bureaucrat 1.13+
ipblock-exempt आइ॰पी ब्लॉक्स, ऑटो-ब्लॉक्स और रेंज ब्लॉक्स को नज़रंदाज़ करें sysop 1.9+
proxyunbannable ⧼right-proxyunbannable⧽ sysop 1.7+
autopatrol अपने सम्पादन स्वचालित रूप से परीक्षित चिन्हित करें - $wgUseRCPatrolManual:$wgUseRCPatrol must be true bot, sysop 1.9+
apihighlimits API पृच्छाओं में ऊँची सीमाएँ प्रयोग करें bot, sysop 1.12+
writeapi write API का प्रयोग करें *, user, bot 1.13+
suppressredirect पृष्ठ स्थानांतरित करते समय पुनर्निर्देश ना छोड़ें bot, sysop 1.12+
autoconfirmed आई॰पी पता आधारित रेट लिमिट्स से बेअसर हों - used for the 'autoconfirmed' group, see the other table below for more information autoconfirmed, bot, sysop 1.6+
emailconfirmed Obsolete. Was 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.


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.

Group Description Default rights Versions
* all users (including anonymous). createaccount, read, edit, createpage, createtalk, writeapi, editmyusercss, editmyuserjs, viewmywatchlist, editmywatchlist, viewmyprivateinfo, editmyprivateinfo, editmyoptions 1.5+
user registered accounts. move, move-subpages, move-rootuserpages, move-categorypages, movefile, read, edit, createpage, createtalk, writeapi, upload, reupload, reupload-shared, minoredit, purge, sendemail, applychangetags, changetags
autoconfirmed registered accounts at least as old as $wgAutoConfirmAgeManual:$wgAutoConfirmAge and having at least as many edits as $wgAutoConfirmCountManual:$wgAutoConfirmCount. autoconfirmed, editsemiprotected 1.6+
emailconfirmed Obsolete, but $wgEmailAuthenticationManual:$wgEmailAuthentication still exists. Registered accounts with confirmed email addresses. 1.7 - 1.13
bot accounts with the bot right (intended for automated scripts). bot, autoconfirmed, editsemiprotected, nominornewtalk, autopatrol, suppressredirect, apihighlimits, writeapi 1.5+
sysop users who by default can delete and restore pages, block and unblock users, et cetera. block, createaccount, delete, bigdelete, deletedhistory, deletedtext, undelete, editinterface, editusercss, edituserjs, import, importupload, move, move-subpages, move-rootuserpages, move-categorypages, patrol, autopatrol, protect, editprotected, proxyunbannable, rollback, upload, reupload, reupload-shared, unwatchedpages, autoconfirmed, editsemiprotected, ipblock-exempt, blockemail, markbotedits, apihighlimits, browsearchive, noratelimit, movefile, unblockself, suppressredirect, upload_by_url, mergehistory, managechangetags 1.5+
bureaucrat users who by default can change other users' rights. userrights, noratelimit 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 $wgAutopromoteManual:$wgAutopromote. You can even create any custom group by just assigning rights to them.

Default rights

The default rights are defined in DefaultSettings.phpManual:DefaultSettings.php.

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 User.phpManual:User.php, $mCoreRights (example). If you're doing so in an extension, you instead need to use $wgAvailableRightsManual:$wgAvailableRights.

You probably also want to also assign it to some user group by editing $wgGroupPermissionsManual:$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 $wgGrantPermissionsManual:$wgGrantPermissions

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

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

//add ninja-powers to the 'basic' grant so we can use our ninja powers over an API request
$wgGrantPermissions['basic']['ninja-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

Log actionsManual:Log actions Events: BlockingManual:Block and unblockImportingManual:Importing revisionsMerging historiesManual:Merging historiesPage deletionManual:Page deletionPage movingManual:Page movingPage restorationManual:Page restorationPatrollingManual:PatrollingProtectionManual:ProtectionRenaming a userExtension:RenameuserRevisionDeleteManual:RevisionDeleteThankingExtension:ThanksUploadingManual:UploadingUser creationManual:User creationUser rights managementManual:User rightsMerging usersManual:Merging users

Settings: $wgLogTypesManual:$wgLogTypes$wgLogActionsManual:$wgLogActions$wgLogNamesManual:$wgLogNames$wgLogHeadersManual:$wgLogHeaders$wgLogActionsHandlersManual:$wgLogActionsHandlers$wgLogRestrictionsManual:$wgLogRestrictions$wgFilterLogTypesManual:$wgFilterLogTypes$wgActionFilteredLogsManual:$wgActionFilteredLogs

Miscellaneous: Logging to Special:LogManual:Logging to Special:LogAPIAPI:Logeventslogging tableManual:Logging tableNull revisionManual:Null revision