Page MenuHomePhabricator

Systematize wgRestrictionLevels
Open, LowPublic

Description

wgRestrictionLevels is clearly not systematized in WMF config. For instance, as of this writing (January 06, 2020), fawiki binds editing extended semi protected articles to extendedconfirmed, while frwiki uses editextendedconfirmed. We should systematize the protection levels various projects want to use, in a way that a) introduces a system b) doesn't break anything projects wishes to use. Given what the two oldest protection levels use (editsemiprotected/editprotected), editxxprotected is the way to go.

Requirements

  • All protection levels shall use right named as editxxprotected
  • No protection level shall abuse another right, such as autopatrol, that's connected primarily with marking one's edit as patrolled automatically

Let's leave templateeditor for now, since it's used at all wikis using that protection level, and decide if we want to rename it at a later point.

Affected projects

  • hewiki (autopatrol)
  • lvwiki (autopatrol)
  • plwiki (editor)
  • srwiki (autopatrol, patrol, rollback, bot)
  • srwikibooks (autopatrol, patrol, rollback, bot)
  • srwikibooks (autopatrol, patrol, rollback, bot)
  • srwikinews (autopatrol, patrol, rollback, bot)
  • srwikisource (autopatrol, patrol, rollback, bot)
  • srwikiquote (autopatrol, patrol, rollback, bot)

In this list, extendedconfirmed and templateeditor is intentionally ommitted, given those are two new rights and it's not clear if those should be kept as exceptions, or renamed as well. Any change regarding those two rights will be announced in Tech News.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

By the way, are there any maintenance script to rename a protection level? We may need a task if no such script exists

There's no need for a script, you just need to make sure all required messages exists and rename stuff in IS.php.

Yes we can just modify the page_restrictions table. But the log may be broken once the old message key are removed.

@Urbanecm : You have created this task and Assigned To yourself :)
And I support the changes that should be made.

An alternative solution is to modify /includes/Title.php and add this code, e.g., to use the autoreviewer protection level used with the editautoreviewprotected permission:

// Backwards compatibility, rewrite autoreviewer -> editautoreviewprotected
			if ( $right == 'autoreviewer' ) {
				$right = 'editautoreviewprotected';
			}

Yes this is used to map sysop=>editprotected and autoconfirmed=>editsemiprotected. But in my opinion this should not be kept indefinitely.

Change 529047 abandoned by Urbanecm:
[tests] Test wgRestrictionLevels entries

Reason:
to be restored when wgRestrictionLevels is systematized

https://gerrit.wikimedia.org/r/529047

Urbanecm changed the task status from Open to Stalled.Nov 3 2019, 1:54 PM

Pending child task.

Urbanecm changed the task status from Stalled to Open.Dec 15 2019, 3:10 PM
Urbanecm moved this task from Analytics/Under discussion to To deploy on the User-Urbanecm board.

Change 529039 merged by jenkins-bot:
[operations/mediawiki-config@master] Use editautoreviewprotected for autoreview protection level only

https://gerrit.wikimedia.org/r/529039

Mentioned in SAL (#wikimedia-operations) [2019-12-16T19:48:57Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: f4cd6d0: Use editautoreviewprotected for autoreview protection level only (T230103) (duration: 00m 57s)

Mentioned in SAL (#wikimedia-operations) [2019-12-16T19:53:42Z] <Urbanecm> mwscript renameRestrictions.php --wiki=arwiki 'autoreview' 'editautoreviewprotected' (T230103)

Mentioned in SAL (#wikimedia-operations) [2019-12-16T19:54:02Z] <Urbanecm> mwscript renameRestrictions.php --wiki=dewiktionary 'autoreviewprotected' 'editautoreviewprotected' (T230103)

Mentioned in SAL (#wikimedia-operations) [2019-12-16T19:55:54Z] <Urbanecm> mwscript renameRestrictions.php --wiki=ptwiki 'autoreviewer' 'editautoreviewprotected' (T230103)

Change 559020 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/WikimediaMessages@master] Add editautopatrolprotected to WikimediaMessages

https://gerrit.wikimedia.org/r/559020

Change 559020 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Add editautopatrolprotected to WikimediaMessages

https://gerrit.wikimedia.org/r/559020

Will template protection also be renamed?

Will template protection also be renamed?

Certainly not anytime soon.

Is there a way to get a list of renamings for a particular wiki?

Is there a way to get a list of renamings for a particular wiki?

I plan to update the task description to provide more information.

Will template protection also be renamed?

I will support rename this. templateeditor sould only be used as a user group name, not a user right name. I even also support renaming sysop and autoconfirmed protection level.

In addition the "semi-protection" concept should also be deprecated in favor of individual custom protection levels.

Change 529043 merged by jenkins-bot:
[operations/mediawiki-config@master] Use editautopatrolprotected right for pages protected for autopatrollers

https://gerrit.wikimedia.org/r/529043

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:31:05Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: 0c2fb70: Use editautopatrolprotected right for pages protected for autopatrollers (T230103) (duration: 01m 06s)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:33:21Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: 0c2fb70: Use editautopatrolprotected right for pages protected for autopatrollers; fixing broken cache (T230103) (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:35:18Z] <Urbanecm> mwscript renameRestrictions.php --wiki=ckbwiki 'autopatrol' 'editautopatrolprotected' (T230103)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:39:08Z] <urbanecm@deploy1001> Synchronized wmf-config/CommonSettings.php: SWAT: 0c2fb70: Use editautopatrolprotected right for pages protected for autopatrollers (2/3; T230103) (duration: 01m 08s)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:40:58Z] <urbanecm@deploy1001> Synchronized wmf-config/flaggedrevs.php: SWAT: 0c2fb70: Use editautopatrolprotected right for pages protected for autopatrollers (3/3; T230103) (duration: 01m 05s)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:44:06Z] <Urbanecm> mwscript renameRestrictions.php --wiki=etwiki 'autopatrol' 'editautopatrolprotected' (T230103)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:44:49Z] <Urbanecm> mwscript renameRestrictions.php --wiki=hewiki 'autopatrol' 'editautopatrolprotected' (T230103)

Mentioned in SAL (#wikimedia-operations) [2020-01-23T12:46:55Z] <Urbanecm> Run renameRestrictions.php 'autopatrol' 'editautopatrolprotected' for all Serbian wikis (T230103)

Change 529046 abandoned by Urbanecm:
Use editeditorprotected for protecting pages for editors

https://gerrit.wikimedia.org/r/529046

Change 566722 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[operations/mediawiki-config@master] Use editeditorprotected for protecting pages for editors

https://gerrit.wikimedia.org/r/566722

Change 566722 merged by jenkins-bot:
[operations/mediawiki-config@master] Use editeditorprotected for protecting pages for editors

https://gerrit.wikimedia.org/r/566722

Mentioned in SAL (#wikimedia-operations) [2020-01-23T19:15:39Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: 2d8f773: Use editeditorprotected for protecting pages for editors (T230103) (duration: 01m 05s)

First of all, I really appreciate the effort to harmonize the names across different wikis. Thanks for starting this.

However, I'm wondering whether "autopatrolers protected" is actually a good title. I don't have a clear answer myself.

A good thing about it is that it's precise and it immediately clarifies to experienced MediaWiki users who can edit such pages.

A less good thing about it is that "autopatrolers" is a very MediaWiki-specific piece of jargon, and it's cryptic to casual readers who may try to edit a page.

For years, the local name for this protection level in the Hebrew Wikipedia has been "הגנה מוגברת", which means "enhanced protection". This name also has advantages and disadvantages. The advantage is that this name fits more or less well into the spectrum of "semi protection" - "enhanced protection" - "full protection". However, it's also a disadvantage, because it is not actually immediately clear whether it's enhanced in comparison to "semi" or to "full". Another disadvantage is that by itself it doesn't clarify what kind of permission does a user need to be able to edit such a page, and one will have to read docs.

So... I want to have a name that:

  • causes as few changes as possible to existing practices names on the various wikis
  • is clear to experienced editors
  • is clear to casual editors
  • is as similar as possible, semantically, in different languages

Correct me if I'm wrong, but I think that everyone can agree to the above.

I don't have a good solution. My intuition tells me that calling it "enhanced protection" or "extended protection" in English is better despite the disadvantages, because it has less jargon, but I'm open to other opinions.

Change 571921 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[integration/config@master] Update wgAvailableRights declaration of autoreviewprotected

https://gerrit.wikimedia.org/r/571921

Change 571921 abandoned by DannyS712:
Update wgAvailableRights declaration of autoreviewprotected

Reason:
Wrong repo

https://gerrit.wikimedia.org/r/571921

Change 571922 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[operations/mediawiki-config@master] Update wgAvailableRights declaration of autoreviewprotected

https://gerrit.wikimedia.org/r/571922

Change 571922 merged by jenkins-bot:
[operations/mediawiki-config@master] Update wgAvailableRights declaration of autoreviewprotected

https://gerrit.wikimedia.org/r/571922

Mentioned in SAL (#wikimedia-operations) [2020-02-13T12:13:34Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: 0f035e4: Update wgAvailableRights declaration of autoreviewprotected (T230103) (duration: 01m 03s)

Not actively working at this task.

Mentioned in SAL (#wikimedia-operations) [2021-09-06T11:48:47Z] <urbanecm> [urbanecm@mwmaint2002 ~]$ mwscript renameRestrictions.php --wiki=arwiki 'autoreview' 'editautoreviewprotected' # T230103

Mentioned in SAL (#wikimedia-operations) [2021-09-06T11:50:19Z] <urbanecm> [urbanecm@mwmaint2002 ~]$ mwscript renameRestrictions.php --wiki=dewiktionary 'autoreviewprotected' 'editautoreviewprotected' # T230103

Mentioned in SAL (#wikimedia-operations) [2021-09-06T11:53:37Z] <urbanecm> [urbanecm@mwmaint2002 ~]$ mwscript renameRestrictions.php --wiki=etwiki 'autopatrol' 'editautopatrolprotected' # T230103

Mentioned in SAL (#wikimedia-operations) [2021-09-06T11:56:27Z] <urbanecm> [urbanecm@mwmaint2002 ~]$ mwscript renameRestrictions.php --wiki={hewiki,lvwiki,srwiki,srwikibooks} 'autopatrol' 'editautopatrolprotected' # T230103

Mentioned in SAL (#wikimedia-operations) [2021-09-06T11:58:22Z] <urbanecm> [urbanecm@mwmaint2002 ~]$ mwscript renameRestrictions.php --wiki=plwiki 'editor' 'editeditorprotected' # T230103

The current declaration of $wgRestrictionLevels for arwiki is:
'arwiki' => [ '', 'autoconfirmed', 'editautoreviewprotected', 'review', 'sysop' ]
For editor protection, the editeditorprotected right is used in some wikis. On arwiki, review is granted to editor, reviewer, and sysop groups. So it's needed to grant the editeditorprotected right to editor, reviewer, and sysop groups, and to change $wgRestrictionLevels array to the following:
'arwiki' => [ '', 'autoconfirmed', 'editautoreviewprotected', 'editeditorprotected', 'sysop' ]
See T321111 for details.