Skip to content

Commit 55f8e2a

Browse files
author
Edward Speyer
committedMay 28, 2013
Let requestors claim their code is picked
Summary: In Releeph, `ReleephRequestHeaderView` will render you a "mark-manually-picked" button if (a) you are authoritative (chuckr) or (b) you are the person who created this Releeph request. However `ReleephRequestActionController`, which handles these button presses, will only do something if you are (a). This patch honors your button pressing if you are (b) as well. Test Plan: Push buttons. There's another bug in the Javascript do-stuff-without-reloading-the-page code that handles these button pushes, but I'd like to fix that separately from handling this hi-pri bug. Reviewers: epriestley, wez Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D6036
1 parent 764e457 commit 55f8e2a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎src/applications/releeph/controller/request/ReleephRequestActionController.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ public function processRequest() {
4949

5050
case 'mark-manually-picked':
5151
case 'mark-manually-reverted':
52-
if (!$releeph_project->isAuthoritative($user)) {
52+
if (
53+
$releeph_request->getRequestUserPHID() === $user->getPHID() ||
54+
$releeph_project->isAuthoritative($user)) {
55+
56+
// We're all good!
57+
} else {
5358
throw new Exception(
54-
"Bug! Only authoritative users (pushers, or users in pusherless ".
55-
"Releeph projects) can manually change a request's in-branch ".
56-
"status!");
59+
"Bug! Only pushers or the requestor can manually change a ".
60+
"request's in-branch status!");
5761
}
5862

5963
if ($action === 'mark-manually-picked') {

0 commit comments

Comments
 (0)
Failed to load comments.