Merge "Revert "Split editcascadeprotected permission from protect permission""
[lhc/web/wiklou.git] / includes / Title.php
index ef806a5..876afe6 100644 (file)
@@ -2122,9 +2122,7 @@ class Title implements LinkTarget {
                        }
                        if ( !$user->isAllowed( $right ) ) {
                                $errors[] = [ 'protectedpagetext', $right, $action ];
-                       } elseif ( $this->mCascadeRestriction &&
-                               !$user->isAllowedAny( 'editcascadeprotected', 'protect' ) )
-                       {
+                       } elseif ( $this->mCascadeRestriction && !$user->isAllowed( 'protect' ) ) {
                                $errors[] = [ 'protectedpagetext', 'protect', $action ];
                        }
                }
@@ -2165,9 +2163,7 @@ class Title implements LinkTarget {
                                        if ( $right == 'autoconfirmed' ) {
                                                $right = 'editsemiprotected';
                                        }
-                                       if ( $right != '' && !$user->isAllowed( $right ) &&
-                                               !$user->isAllowedAny( 'editcascadeprotected', 'protect' ) )
-                                       {
+                                       if ( $right != '' && !$user->isAllowedAll( 'protect', $right ) ) {
                                                $pages = '';
                                                foreach ( $cascadingSources as $page ) {
                                                        $pages .= '* [[:' . $page->getPrefixedText() . "]]\n";