r32164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32163‎ | r32164 | r32165 >
Date:11:23, 19 March 2008
Author:huji
Status:old
Tags:
Comment:
(bug 13137) Bots to edit protected pages
For the record: A previous effort to fix this (r31247) failed (r31462)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1193,7 +1193,18 @@
11941194 $right = 'protect';
11951195 }
11961196 if( '' != $right && !$user->isAllowed( $right ) ) {
1197 - $errors[] = array( 'protectedpagetext', $right );
 1197+ //Users with 'editprotected' permission can edit protected pages
 1198+ if( $action=='edit' && $user->isAllowed( 'editprotected' ) ) {
 1199+ //Users with 'editprotected' permission cannot edit protected pages
 1200+ //with cascading option turned on.
 1201+ if($this->mCascadeRestriction) {
 1202+ $errors[] = array( 'protectedpagetext', $right );
 1203+ } else {
 1204+ //Nothing, user can edit!
 1205+ }
 1206+ } else {
 1207+ $errors[] = array( 'protectedpagetext', $right );
 1208+ }
11981209 }
11991210 }
12001211
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1132,7 +1132,6 @@
11331133 $wgGroupPermissions['sysop']['patrol'] = true;
11341134 $wgGroupPermissions['sysop']['autopatrol'] = true;
11351135 $wgGroupPermissions['sysop']['protect'] = true;
1136 -$wgGroupPermissions['sysop']['editprotected'] = true;
11371136 $wgGroupPermissions['sysop']['proxyunbannable'] = true;
11381137 $wgGroupPermissions['sysop']['rollback'] = true;
11391138 $wgGroupPermissions['sysop']['trackback'] = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -115,18 +115,22 @@
116116 * Implemented {bl,ei,iu}redirect (lists links through redirects as well)
117117 * (bug 13154) Introduced subpages flag to meta=siteinfo&siprop=namespaces
118118 * (bug 13157) Added ucuserprefix parameter to list=usercontibs
119 -* (bug 12394) Added rctitles parameter to list=recentchanges, making rcid retrieval easier
 119+* (bug 12394) Added rctitles parameter to list=recentchanges, making rcid
 120+ retrieval easier
120121 * (bug 13218) Fix inclusion of " character in hyperlinks
121122 * Added watch and unwatch parameters to action=delete and action=move
122123 * Added action=edit
123124 * (bug 11401) Added xmldoublequote to xml formatter
124 -* Added rvsection parameter to prop=revisions to allow fetching the content of a certain section only
 125+* Added rvsection parameter to prop=revisions to allow fetching the content of
 126+ a certain section only
125127 * Introduced list=allimages
126128 * (bug 13371) Build page set from image hashes
127129 * Mark non-existent messages in meta=allmessages as missing
128130 * (bug 13390) One invalid title no longer kills an entire API query
129131 * (bug 13419) Fix gblredirect so it actually works
130132 * (bug 13418) Disable eiredirect because it's useless
 133+* (bug 13137) Allow setting 'editprotected' right separately from 'protect',
 134+ so groups may optionally edit protected pages without having 'protect' perms
131135
132136 === Languages updated in 1.13 ===
133137

Follow-up revisions

RevisionCommit summaryAuthorDate
r32334* Per r32164: adding commented out 'editprotected' right to group 'bot'...ialex17:15, 22 March 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r31247(bug 13137) Bots to edit protected pageshuji10:36, 25 February 2008
r31462Partially reverting r31247:...huji19:26, 2 March 2008

Status & tagging log