Fix grossness in Herald daemon
Summary: Do this in a reasonably proper / formal way. Leave a TODO for the policy stuff. Test Plan: Ran `scripts/repository/reparse.php --herald rPnnnnn` Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D5150
This commit is contained in:
@@ -77,14 +77,8 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||
$commit->getPHID(),
|
||||
));
|
||||
|
||||
// TODO: This is complicated and needs to be sorted out properly for
|
||||
// repository policy stuff. We might need an omniscient user here? This
|
||||
// fakes a logged-in user.
|
||||
$viewer = id(new PhabricatorUser())
|
||||
->setPHID('PHID-USER-XXX');
|
||||
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))
|
||||
->setViewer($viewer)
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->loadHandles();
|
||||
|
||||
$commit_handle = $handles[$commit->getPHID()];
|
||||
@@ -158,6 +152,9 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||
$template->setFrom($author_phid);
|
||||
}
|
||||
|
||||
// TODO: We should verify that each recipient can actually see the
|
||||
// commit before sending them email (T603).
|
||||
|
||||
$mails = $reply_handler->multiplexMail(
|
||||
$template,
|
||||
id(new PhabricatorObjectHandleData($email_phids))->loadHandles(),
|
||||
|
||||
Reference in New Issue
Block a user