From: Huji Date: Wed, 19 Mar 2008 11:23:03 +0000 (+0000) Subject: (bug 13137) Bots to edit protected pages X-Git-Tag: 1.31.0-rc.0~48988 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=ab2b37135f92115bd8f8b504b6f87389a058e35b;p=lhc%2Fweb%2Fwiklou.git (bug 13137) Bots to edit protected pages For the record: A previous effort to fix this (r31247) failed (r31462) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ff9741dd3c..63cfdd6d6b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -115,18 +115,22 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Implemented {bl,ei,iu}redirect (lists links through redirects as well) * (bug 13154) Introduced subpages flag to meta=siteinfo&siprop=namespaces * (bug 13157) Added ucuserprefix parameter to list=usercontibs -* (bug 12394) Added rctitles parameter to list=recentchanges, making rcid retrieval easier +* (bug 12394) Added rctitles parameter to list=recentchanges, making rcid + retrieval easier * (bug 13218) Fix inclusion of " character in hyperlinks * Added watch and unwatch parameters to action=delete and action=move * Added action=edit * (bug 11401) Added xmldoublequote to xml formatter -* Added rvsection parameter to prop=revisions to allow fetching the content of a certain section only +* Added rvsection parameter to prop=revisions to allow fetching the content of + a certain section only * Introduced list=allimages * (bug 13371) Build page set from image hashes * Mark non-existent messages in meta=allmessages as missing * (bug 13390) One invalid title no longer kills an entire API query * (bug 13419) Fix gblredirect so it actually works * (bug 13418) Disable eiredirect because it's useless +* (bug 13137) Allow setting 'editprotected' right separately from 'protect', + so groups may optionally edit protected pages without having 'protect' perms === Languages updated in 1.13 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e8d7ef9824..6a8b156f56 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1132,7 +1132,6 @@ $wgGroupPermissions['sysop']['move'] = true; $wgGroupPermissions['sysop']['patrol'] = true; $wgGroupPermissions['sysop']['autopatrol'] = true; $wgGroupPermissions['sysop']['protect'] = true; -$wgGroupPermissions['sysop']['editprotected'] = true; $wgGroupPermissions['sysop']['proxyunbannable'] = true; $wgGroupPermissions['sysop']['rollback'] = true; $wgGroupPermissions['sysop']['trackback'] = true; diff --git a/includes/Title.php b/includes/Title.php index c65ce10000..8191b2a565 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1193,7 +1193,18 @@ class Title { $right = 'protect'; } if( '' != $right && !$user->isAllowed( $right ) ) { - $errors[] = array( 'protectedpagetext', $right ); + //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! + } + } else { + $errors[] = array( 'protectedpagetext', $right ); + } } }