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.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a project: User-Urbanecm. · View Herald TranscriptAug 8 2019, 7:59 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm triaged this task as Low priority.Aug 8 2019, 7:59 AM
Urbanecm updated the task description. (Show Details)Aug 8 2019, 8:01 AM
Urbanecm updated the task description. (Show Details)Aug 8 2019, 8:12 AM

Change 529039 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[operations/mediawiki-config@master] Use editautoreviewprotected for autoreview protection level only

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

Change 529043 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[operations/mediawiki-config@master] [wip] Use editautopatrolprotected right for pages protected for autopatrollers

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

Change 529046 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/529046

Change 529047 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[operations/mediawiki-config@master] [tests] Test wgRestrictionLevels entries

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

Bugreporter added a subscriber: Bugreporter.EditedAug 8 2019, 9:54 AM

I think we should consider T169626: Deprecate 'autoconfirmed' and 'sysop' value from $wgRestrictionLevels and related settings, though this will be a huge breaking change.

We should not have any exception in InitialiseSettingsTest (the templateeditor right should also be renamed to edittemplateprotected).

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

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.

Urbanecm moved this task from Backlog to Working on on the User-Urbanecm board.Aug 10 2019, 7:19 PM

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)

Urbanecm moved this task from To deploy to Later on the User-Urbanecm board.Dec 16 2019, 8:09 PM

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

Urbanecm moved this task from Later to Working on on the User-Urbanecm board.Dec 19 2019, 11:49 AM
Urbanecm moved this task from Working on to Later on the User-Urbanecm board.Dec 24 2019, 4:15 PM

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.

Urbanecm updated the task description. (Show Details)Jan 6 2020, 12:19 PM
Restricted Application added a subscriber: Petar.petkovic. · View Herald TranscriptJan 6 2020, 12:19 PM
Bugreporter added a comment.EditedJan 6 2020, 2:00 PM

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.

Wargo added a subscriber: Wargo.Jan 7 2020, 9:17 AM

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)