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.

Details

Related Gerrit Patches:
operations/mediawiki-config : masterUse editeditorprotected for protecting pages for editors
operations/mediawiki-config : masterUse editautopatrolprotected right for pages protected for autopatrollers
operations/mediawiki-config : masterUse editeditorprotected for protecting pages for editors
mediawiki/extensions/WikimediaMessages : masterAdd editautopatrolprotected to WikimediaMessages
operations/mediawiki-config : masterUse editautoreviewprotected for autoreview protection level only
operations/mediawiki-config : master[tests] Test wgRestrictionLevels entries

Event Timeline

Urbanecm created this task.Aug 8 2019, 7:59 AM
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)Mon, Jan 6, 12:19 PM
Restricted Application added a subscriber: Petar.petkovic. · View Herald TranscriptMon, Jan 6, 12:19 PM
Bugreporter added a comment.EditedMon, Jan 6, 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.Tue, Jan 7, 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)