r45636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45635‎ | r45636 | r45637 >
Date:14:15, 10 January 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Grant sysops and old users 'autoreview'
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -160,8 +160,7 @@
161161
162162 # Lets some users access the review UI and set some flags
163163 $wgAvailableRights[] = 'review';
164 -# Let some users set higher settings
165 -$wgAvailableRights[] = 'validate';
 164+$wgAvailableRights[] = 'validate'; # Let some users set higher settings
166165 $wgAvailableRights[] = 'autoreview';
167166 $wgAvailableRights[] = 'patrolmarks';
168167 $wgAvailableRights[] = 'autopatrolother';
@@ -180,6 +179,8 @@
181180 # Let this stand alone just in case...
182181 $wgGroupPermissions['reviewer']['review'] = true;
183182
 183+# Sysops have their edits autoreviewed
 184+$wgGroupPermissions['sysop']['autoreview'] = true;
184185 # Stable version selection and default page revision selection can be set per page.
185186 $wgGroupPermissions['sysop']['stablesettings'] = true;
186187 # Sysops can always move stable pages
@@ -189,7 +190,10 @@
190191 # namespaces autopatrolled.
191192 $wgGroupPermissions['autoconfirmed']['autopatrolother'] = true;
192193
193 -# Define when users get automatically promoted to editors. Set as false to disable.
 194+# Implicit autoreview group
 195+$wgGroupPermissions['autoreview']['autoreview'] = true;
 196+
 197+# Define when users get automatically promoted to Editors. Set as false to disable.
194198 # 'spacing' and 'benchmarks' require edits to be spread out. Users must have X (benchmark)
195199 # edits Y (spacing) days apart.
196200 $wgFlaggedRevsAutopromote = array(
@@ -462,6 +466,15 @@
463467 global $wgHooks;
464468 $wgHooks['userCan'][] = 'FlaggedRevsHooks::userCanView';
465469 }
 470+ # Grant implicit autoreview rights to some users.
 471+ # This will include older users that choose not to be Editors.
 472+ global $wgAutopromote, $wgFlaggedRevsAutopromote;
 473+ $wgAutopromote['autoreview'] = array( '&',
 474+ array( APCOND_EDITCOUNT, max($wgFlaggedRevsAutopromote['edits'],3000) ),
 475+ array( APCOND_AGE, max($wgFlaggedRevsAutopromote['days'],120)*24*3600 ),
 476+ array( APCOND_AGE_FROM_EDIT, max($wgFlaggedRevsAutopromote['days'],120)*24*3600 ),
 477+ array( APCOND_EMAILCONFIRMED, true )
 478+ );
466479 }
467480
468481 /*

Follow-up revisions

RevisionCommit summaryAuthorDate
r46443Follow up r45636: Add group-* messages for the new 'autoreview' groupraymond13:08, 28 January 2009

Comments

#Comment by Raymond (talk | contribs)   13:11, 28 January 2009

r46443: group-* messages for the new 'autoreview' group added.

Status & tagging log