From bab35f28e49d7cc03f5c190482de50cf92499459 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 17 Jun 2019 10:08:08 -0700 Subject: [PATCH] Respect repository identities when selecting author vs auditor actions Summary: Depends on D20580. Fixes T13311. When we choose which actions to show a user, we can either show them "auditor" actions (like "raise concern") or "author" actions (like "request verification"). Currently, we don't show "author" actions if you're the author of the commit via an identity mapping, but we should. Use identity mappings where they exist. (Because I've implemented `getEffectiveAuthorPHID()` in a way that requires `$data` be attached, it's possible this will make something throw a "DataNotAttached" exception, but: probably it won't?; and that's easy to fix if it happens.) Test Plan: See D20580. As `@alice`, viewed the commit in the UI. - Before: got auditor actions presented to me. - After: got author actions. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13311 Differential Revision: https://secure.phabricator.com/D20581 --- .../diffusion/xaction/DiffusionCommitActionTransaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php index d2e5f17ccb..1d351ffa5d 100644 --- a/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php +++ b/src/applications/diffusion/xaction/DiffusionCommitActionTransaction.php @@ -63,7 +63,7 @@ abstract class DiffusionCommitActionTransaction return false; } - return ($viewer->getPHID() === $commit->getAuthorPHID()); + return ($viewer->getPHID() === $commit->getEffectiveAuthorPHID()); } public function newEditField(