Manual:User rights/he

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

הרשאות משתמש הן הרשאות (כגון היכולת לערוך דפים או לחסום משתמשים) אשר יכולות להינתן עבור קבוצות משתמש שונות. מדיה־ויקי מגיעה עם ערכת בררת־מחדל של הרשאות משתמש וקבוצות משתמש, אבל אלו יכולות להיות מותאמות אישית. דף זה נותן הסבר אודות הרשאות וקבוצות בררת המחדל וכיצד ניתן להתאים אותן כרצונך.

למידע אודות האופן בו ניתן להוסיף ולהסיר משתמשים מסוימים מקבוצות משתמש, ראו Help:User rights and groups וגם Manual:Setting user groups in MediaWiki .

שינוי רשימת ההרשאות לקבוצה

בתור בררת־מחדל, מדיה־ויקי מגיעה עם הרשאות מסוימות ששויכו לקבוצות בררת־מחדל (ראו להלן). ניתן לשנות את הרשאות בררת המחדל על ידי עריכת מערך ה־$wgGroupPermissions בקובץ LocalSettings.php תוך שימוש בתחביר.

$wgGroupPermissions['group']['right'] = true /* או false */;
כבררת־מחדל, $wgGroupPermissions יוגדר דרך הדף includes/DefaultSettings.php, ו"לא" מופיע בקובץ LocalSettings.php. לאחר מכן, יש להוסיף את זה לקובץ זה.

אם משתמש כלשהו חבר במספר קבוצות, הוא יקבל את כל ההרשאות שניתנות עבור כל קבוצה אליה הוא שייך. כל המשתמשים, כולל משתמשים אנונימים, שייכים לקבוצה '*' (כולם); כל המשתמשים הרשומים שייכים לקבוצה 'user' (משתמש). בנוסף לקבוצות בררת המחדל, ניתן ליצור קבוצות משתמש מותאמות אישית תוך שימוש באותו המערך.

דוגמאות

בדוגמה זו מוצג קוד שמאפשר לבטל את היכולת לצפות בכל הדפים שאינם נמצאים בדף $wgWhitelistRead , ולאחר מכן להפעיל אותה עבור משתמשים רשומים בלבד:

$wgGroupPermissions['*']['read'] = false;
# באופן עקרוני, השורה הבאה אינה הכרחית, מהסיבה שהיא מכילה את הגדרות בררת המחדל. הגדרת הקבוצה '*' ל־false לא מבטלת את ההרשאות עבור קבוצות בהן הן מוגדרות ל־true בנפרד!
$wgGroupPermissions['user']['read'] = true;

בדוגמה הבאה מוצג קוד שבאמצעותו ניתן לבטל את יכולת העריכה עבור כל הדפים, ולאחר מכן הפעלת אפשרות זו רק עבור משתמשים שאימתו את כתובת הדוא"ל שלהם:

# ביטול עבור כולם.
$wgGroupPermissions['*']['edit'] = false;
# ביטול גם עבור משתמשים רשומים: כבררת־מחדל קבוצת 'user' יכולה לערוך, גם אם '*' לא יכולה.
$wgGroupPermissions['user']['edit'] = false;
# להפוך את האפשרות הזאת לזמינה, באופן בו משתמשים שאימתו את כתובת הדוא"ל שלהם משויכים אוטומטית לקבוצה.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
# הסתרת הקבוצה מרשימת קבוצות המשתמש.
$wgImplicitGroups[] = 'emailconfirmed';
# לסיום, הגדרת האפשרות ל־true עבור הקבוצה המתאימה.
$wgGroupPermissions['emailconfirmed']['edit'] = true;

יצירת קבוצה חדשה והגדרת הרשאות עבור הקבוצה

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)

הסרת קבוצות שהוקצו מראש

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'] );
};


הערה לגבי הקבוצה הקרויה בשם "משתמש" (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.

רשימת הרשאות

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
<span id="Reading">Reading
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+
<span id="Editing">Editing
applychangetags החלת תגיות יחד עם שינויים - requires the edit right user 1.25+
autocreateaccount כניסה אוטומטית באמצעות חשבון משתמש חיצוני - a more limited version of createaccount 1.27+
createaccount יצירת חשבונות משתמש חדשים - register / registration *, sysop 1.5+
createpage יצירת דפים שאינם דפי שיחה - requires the edit right *, user 1.6+
createtalk יצירת דפי שיחה - requires the edit right *, user 1.6+
delete-redirect מחיקת דפי הפניה עם גרסה אחת (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 העלאת גרסאות חדשות של קבצים קיימים שהועלו על־ידי המשתמש עצמו - requires the upload 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, 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 הוספת תגיות לגרסאות ולרשומות יומן או הסרת תגיות מהן - 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 צפייה בגרסאות שנמחקו, ללא הטקסט המשויך אליהן sysop 1.6+
deletedtext צפייה בתוכן שנמחק ובהבדלים בין גרסאות שנמחקו sysop
deletelogentry מחיקה וביטול מחיקה של פעולות יומן - allows deleting/undeleting information (action text, summary, user who made the action) of specific log entries - requires the deleterevision right suppress 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 suppress 1.6+
editcontentmodel שינוי מודל התוכן של דפים - requires the edit right user 1.23.7+
editinterface עריכת ממשק המשתמש - 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 עריכת קובצי CSS של המשתמש עצמו - 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 עריכת קובצי JavaScript של המשתמש עצמו - 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 עריכת קובצי JavaScript של המשתמש עצמו שהם הפניות (note that this is not needed if the group already has the edituserjs right) - requires the edit right 1.34+
editmyuserjson עריכת קובצי JSON של המשתמש עצמו (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 עריכת קובצי CSS של האתר כולו - requires the editinterface right interface-admin 1.32+
editsitejs עריכת קובצי JavaScript של האתר כולו - requires the editinterface right interface-admin 1.32+
editsitejson עריכת קובצי 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 הבחנה בין עריכות שנבדקו לעריכות שטרם נבדקו בדף השינויים האחרונים 1.16+
protect שינוי הגדרות הגנה של דפים ועריכת דפים המוגנים בהגנה מדורגת - requires the edit right sysop 1.5+
rollback שחזור מהיר של העריכות שנעשו על־ידי העורך האחרון בדפים - requires the edit right sysop 1.5+
suppressionlog צפייה ביומנים פרטיים suppress 1.6+
suppressrevision צפייה, הסתרה וביטול הסתרה של גרסאות מסוימות בדפים מכל המשתמשים - 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 צפייה בגרסאות שהוסתרו מכל המשתמשים - 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 מחיקת תגיות מבסיס הנתונים - currently unused by extensions sysop 1.28+
import יבוא דפים מאתרי ויקי אחרים - "transwiki" - requires the edit right sysop 1.5+
importupload יבוא דפים באמצעות העלאת קבצים - This right was called 'importraw' in and before version 1.5 - requires the edit right sysop 1.5+
managechangetags יצירה, הפעלה וביטול של תגיות - currently unused by extensions sysop 1.25+
siteadmin נעילה וביטול נעילה של בסיס הנתונים - 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 שימוש ב־API עם פחות מגבלות bot, sysop 1.12+
autoconfirmed עקיפת המגבלה על קצב הפעולות שניתן לבצע מכתובת IP מסוימת - 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 עקיפת חסימות של כתובות IP, חסימות אוטומטיות וחסימות טווחים sysop 1.9+
nominornewtalk ביטול שליחת התראה על הודעה חדשה למשתמש בעת עריכה משנית בדף השיחה שלו - requires the minoredit right bot 1.9+
noratelimit עקיפת המגבלה על קצב הפעולות - 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 יצוא דפים כולל הדפים המקושרים עד עומק של 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.

רשימת קבוצות

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

הרשאות בררת־מחדל

The default rights are defined in MainConfigSchema.php .

  • Default values in HEAD version:

https://phabricator.wikimedia.org/diffusion/MW/browse/master/includes/MainConfigSchema.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/MainConfigSchema.php

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

הוספת הרשאות חדשות

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


ראו גם