Improve UI for page protection with $wgNamespaceProtection
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 28 Jun 2013 20:49:47 +0000 (16:49 -0400)
committerTim Starling <tstarling@wikimedia.org>
Tue, 3 Dec 2013 22:27:28 +0000 (22:27 +0000)
commit8862991ce1b125f22a094399868d192c15a2115a
treec13d869a784b7dff521b1caeeeb086fea3c2642f
parent93131fcd385cdae84ecb7ccb6faa1c7340214211
Improve UI for page protection with $wgNamespaceProtection

Right now, if you set $wgNamespaceProtection, the protection interface
is confusing: it will allow you to apply "useless" protection levels for
any namespace except MediaWiki, where it will refuse to let you set any
protection at all.

The fix is to find which restriction levels are more restrictive than
the $wgNamespaceProtection restriction (i.e. where there is at least one
group that can pass $wgNamespaceProtection but not the level from
$wgRestrictionLevels), and use only those in the protection form. If
there are no such levels, we can skip showing the "protect" tab
entirely.

Change-Id: I9e2b29ade566abcd008ea2ad1e2f9818e315bb32
RELEASE-NOTES-1.23
includes/EditPage.php
includes/Namespace.php
includes/ProtectionForm.php
includes/SkinTemplate.php