allow people with the "protect" privilege to unprotect pages with "sysop" restriction
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 14 May 2005 05:38:01 +0000 (05:38 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 14 May 2005 05:38:01 +0000 (05:38 +0000)
includes/Title.php

index 288a5f2..f663096 100644 (file)
@@ -863,6 +863,10 @@ class Title {
                }
 
                foreach( $this->getRestrictions($action) as $right ) {
+                       // Backwards compatibility, rewrite sysop -> protect
+                       if ( $right == 'sysop' ) {
+                               $right = 'protect';
+                       }
                        if( '' != $right && !$wgUser->isAllowed( $right ) ) {
                                wfProfileOut( $fname );
                                return false;