Page MenuHomePhabricator

New magic word like PROTECTIONLEVEL to give flag restrictions information
Closed, ResolvedPublic


Author: wiki.nihiltres

It would be good to have a magic word that was the equivalent of, or part of (think {{PROTECTIONLEVEL:flaggedrevs}} or something), the {{PROTECTIONLEVEL:foobar}} magic word that is used for protection. This is particularly the case as the Pending Changes implementation on the English Wikipedia uses the protection interface for changing the settings. There is already a use-case: existing code in the {{pp-meta}} template on the English Wikipedia uses {{PROTECTIONLEVEL:edit}} and {{PROTECTIONLEVEL:move}} code to determine whether the placement of a protection template on a page is appropriate. It's not super-high priority, but this is a relatively simple feature that is demonstrably useful.

Ideally, such a magic word would have similar output to the protectionlevel one: returning nothing if unprotected, and otherwise the minimum level of permissions required to edit it normally. So, for example, the "normal" level of Pending Changes would probably output "autoconfirmed" and the "Level II" setting "reviewer", but I might be incorrectly interpreting the semantics.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:08 PM
bzimport set Reference to bz24004.

Second use-case is at MediaWiki:Edittools, we currently tell people their changes will be immediately visible, which is not always the case.