r93108 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93107‎ | r93108 | r93109 >
Date:20:26, 25 July 2011
Author:reedy
Status:ok
Tags:
Comment:
Stop users marking their own revisions resolved (as well as ok)
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -282,10 +282,10 @@
283283 throw new MWException( "Tried to save invalid code revision status" );
284284 }
285285
286 - // Don't allow the user account tied to the committer account mark their own revisions as ok
 286+ // Don't allow the user account tied to the committer account mark their own revisions as ok/resolved
287287 // Obviously only works if user accounts are tied!
288288 $wikiUser = $this->getWikiUser();
289 - if ( $status == 'ok' && $wikiUser && $user->getName() == $wikiUser->getName() ) {
 289+ if ( ( $status == 'ok' || $status == 'resolved' ) && $wikiUser && $user->getName() == $wikiUser->getName() ) {
290290 // allow the user to review their own code if required
291291 if ( !$wikiUser->isAllowed( 'codereview-review-own' ) ) {
292292 return false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r93109Followup r93108, add "or Resolved" to right-codereview-review-ownreedy20:27, 25 July 2011
r94793MFT r93108, r93109reedy19:08, 17 August 2011

Status & tagging log