- //Users with 'editprotected' permission can edit protected pages
- if( $action=='edit' && $user->isAllowed( 'editprotected' ) ) {
- //Users with 'editprotected' permission cannot edit protected pages
- //with cascading option turned on.
- if($this->mCascadeRestriction) {
- $errors[] = array( 'protectedpagetext', $right );
- } else {
- //Nothing, user can edit!
- }
+ // Users with 'editprotected' permission can edit protected
+ // pages if protection is not with cascading option turned on.
+ if( $action=='edit' && $user->isAllowed( 'editprotected' ) && !$this->areRestrictionsCascading() ) {
+ // Nothing, user can edit!