Last modified: 2013-10-24 18:26:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45462, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43462 - MediaWiki interface do not take into account values of $wgRestrictionLevels other than "autoconfirmed" and "sysop"
MediaWiki interface do not take into account values of $wgRestrictionLevels o...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page protection (Other open bugs)
1.21.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-27 14:25 UTC by Helder
Modified: 2013-10-24 18:26 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2012-12-27 14:25:04 UTC
After "autoreviewer" was added to $wgRestrictionLevels on ptwiki (see bug 39652), a user noticed[1] some parts of MW interface do not take this new value into account. Digging into the code, I found these problems so far:
1. On Title.php, isSemiProtected() only consider the level "autoconfirmed"[2]
2. (Consequently) On EditPage.php, showTextbox1() do not add CSS classes for other semiprotection levels [3]
3. On Linker.php, formatTemplates() only consider messages [[MediaWiki:template-semiprotected]] and [[MediaWiki:template-protected]], instead of using a convention such as "template-level-<a value from $wgRestrictionLevels here>", similar to the way "MediaWiki:Protect-level-***" and "MediaWiki:Restriction-level-***" works [4][5][6]
There may be other places where the new value is not working either...

[1] https://pt.wikipedia.org/w/index.php?diff=33433428&diffonly=1
[2] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/Title.php;h=a20367dcefb1786bc24a570e6bb983daf293f7ef;hb=HEAD#l2384
[3] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/EditPage.php;h=ad6c98d1108ef4228bf2b02864755936f0725925;hb=HEAD#l2482
[4] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/Linker.php;h=05a9905669f95fcb573f851da6d58bad8a340161;hb=HEAD#l1858
[5] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/specials/SpecialProtectedpages.php;h=74ed5378e4143644cced27858c4248ccbc0b5f51;hb=HEAD#l261
[6] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/ProtectionForm.php;h=e844a1e9ab4dac5a73bd16e0e86ce7f58da470d2;hb=HEAD#l582
Comment 1 Bartosz Dziewoński 2013-04-07 16:43:21 UTC
This should be reasonably easy to do - +keyword:easy.
Comment 2 Bartosz Dziewoński 2013-10-18 13:55:33 UTC
Another issue – there is no protection information on the transclusion list below edit form. https://en.wikipedia.org/wiki/File:No_(protected_template).png
Comment 3 Gerrit Notification Bot 2013-10-18 14:34:04 UTC
Change 90551 had a related patch set uploaded by Anomie:
Use restriction-level-* messages in Linker::formatTemplates

https://gerrit.wikimedia.org/r/90551
Comment 4 Gerrit Notification Bot 2013-10-18 15:03:29 UTC
Change 90552 had a related patch set uploaded by Anomie:
Add $wgSemiprotectedRestrictionLevels

https://gerrit.wikimedia.org/r/90552
Comment 5 Gerrit Notification Bot 2013-10-23 03:27:14 UTC
Change 90551 merged by jenkins-bot:
Use restriction-level-* messages in Linker::formatTemplates

https://gerrit.wikimedia.org/r/90551
Comment 6 Gerrit Notification Bot 2013-10-23 23:24:50 UTC
Change 90552 merged by jenkins-bot:
Add $wgSemiprotectedRestrictionLevels

https://gerrit.wikimedia.org/r/90552
Comment 7 Brad Jorsch 2013-10-24 16:54:26 UTC
Both patches are now merged. The changes should be deployed to WMF wikis with 1.23wmf1, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.

Note that this doesn't actually change the "autoreviewer" protection level on ptwiki to be considered semiprotected, it just makes it possible to do so. If you want that done, please follow the instructions at https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes to file a new bug requesting that autoreviewer be added to $wgSemiprotectedRestrictionLevels for ptwiki.
Comment 8 Helder 2013-10-24 18:02:50 UTC
From the description[1] of this new $wgSemiprotectedRestrictionLevels, isn't the "semiprotection" only for automatically granted rights which are in $wgAutopromote? (this is not the case of ptwiki's "autoreviewer", which is granted only after requested[2])


[1] https://gerrit.wikimedia.org/r/#/c/90552/4/includes/DefaultSettings.php,unified

[2] https://pt.wikipedia.org/wiki/Wikipedia:Pedidos/Autorrevisor
Comment 9 Brad Jorsch 2013-10-24 18:26:35 UTC
It being in $wgAutopromote is a good indicator that the protection level could be considered "semi-protection", but it's not necessary. If the right is granted on request with minimal qualifications, it could still be considered "semi-protected". In the end, it's up to the ptwiki community whether they look at it that way or not.

Currently, it looks like the only differences caused by adding a protection level to $wgSemiprotectedRestrictionLevels are:
* The message "semiprotectedpagewarning" is displayed instead of "protectedpagewarning" when editing the page.
* The message "semiprotectedpagemovewarning" is displayed instead of "protectedpagemovewarning" when moving the page.
* The textarea gets class "mw-textarea-sprotected" instead of "mw-textarea-protected" when editing or moving the page.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links