Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -102,6 +102,7 @@ |
103 | 103 | $wgAvailableRights[] = 'codereview-signoff'; |
104 | 104 | $wgAvailableRights[] = 'codereview-associate'; |
105 | 105 | $wgAvailableRights[] = 'codereview-link-user'; |
| 106 | +$wgAvailableRights[] = 'codereview-review-own'; |
106 | 107 | |
107 | 108 | $wgGroupPermissions['*']['codereview-use'] = true; |
108 | 109 | |
Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -265,7 +265,10 @@ |
266 | 266 | // Obviously only works if user accounts are tied! |
267 | 267 | $wikiUser = $this->getWikiUser(); |
268 | 268 | if ( $status == 'ok' && $wikiUser && $user->getName() == $wikiUser->getName() ) { |
269 | | - return false; |
| 269 | + // allow the user to review their own code if required |
| 270 | + if ( !$wikiUser->isAllowed( 'codereview-review-own' ) ) { |
| 271 | + return false; |
| 272 | + } |
270 | 273 | } |
271 | 274 | |
272 | 275 | // Get the old status from the master |
Index: trunk/extensions/CodeReview/CodeReview.i18n.php |
— | — | @@ -224,6 +224,7 @@ |
225 | 225 | 'right-codereview-signoff' => 'Sign off on revisions', |
226 | 226 | 'right-codereview-link-user' => 'Link authors to wiki users', |
227 | 227 | 'right-codereview-associate' => 'Manage revision associations', |
| 228 | + 'right-codereview-review-own' => 'Mark your own revisions as OK', |
228 | 229 | |
229 | 230 | 'specialpages-group-developer' => 'Developer tools', |
230 | 231 | |
— | — | @@ -353,8 +354,9 @@ |
354 | 355 | 'right-codereview-post-comment' => '{{doc-right}}', |
355 | 356 | 'right-codereview-set-status' => '{{doc-right}}', |
356 | 357 | 'right-codereview-signoff' => 'A "sign-off" is a concept in code review that means that the person doing the sign-off has approved the involved code changes.', |
357 | | - 'right-codereview-link-user' => '{{Doc-right}}', |
| 358 | + 'right-codereview-link-user' => '{{doc-right}}', |
358 | 359 | 'right-codereview-associate' => '{{doc-right|codereview-associate}}', |
| 360 | + 'right-right-codereview-review-own' => '{{doc-right}}', |
359 | 361 | ); |
360 | 362 | |
361 | 363 | /** Afrikaans (Afrikaans) |