Page MenuHomePhabricator

D20580.id.diff
No OneTemporary

D20580.id.diff

diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
--- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php
@@ -466,6 +466,18 @@
return $data->getCommitDetail('authorPHID');
}
+ public function getEffectiveAuthorPHID() {
+ if ($this->hasAuthorIdentity()) {
+ $identity = $this->getAuthorIdentity();
+ if ($identity->hasEffectiveUser()) {
+ return $identity->getCurrentEffectiveUserPHID();
+ }
+ }
+
+ $data = $this->getCommitData();
+ return $data->getCommitDetail('authorPHID');
+ }
+
public function getAuditStatusObject() {
$status = $this->getAuditStatus();
return DiffusionCommitAuditStatus::newForStatus($status);
diff --git a/src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php b/src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
--- a/src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
+++ b/src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
@@ -147,7 +147,7 @@
$data = $commit->getCommitData();
- $author_phid = $data->getCommitDetail('authorPHID');
+ $author_phid = $commit->getEffectiveAuthorPHID();
$revision = DiffusionCommitRevisionQuery::loadRevisionForCommit(
$viewer,

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 24, 3:57 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7717991
Default Alt Text
D20580.id.diff (1 KB)

Event Timeline