allow people with the "protect" privilege to unprotect pages with "sysop" restriction
[lhc/web/wiklou.git] / 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;