1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00

Fix two cases where we load Commit handles without a viewer

I missed these in testing D5139 because they aren't in the web UIs and I am dumb and can not brain today.

Auditors: vrana
This commit is contained in:
epriestley 2013-02-27 11:43:57 -08:00
parent 68813d18e0
commit 69dcd47751
2 changed files with 8 additions and 1 deletions

View file

@ -226,6 +226,7 @@ final class ManiphestTransactionEditor extends PhabricatorEditor {
$phids = array_keys($phids); $phids = array_keys($phids);
$handles = id(new PhabricatorObjectHandleData($phids)) $handles = id(new PhabricatorObjectHandleData($phids))
->setViewer($this->getActor())
->loadHandles(); ->loadHandles();
$view = new ManiphestTransactionDetailView(); $view = new ManiphestTransactionDetailView();

View file

@ -77,7 +77,13 @@ final class PhabricatorRepositoryCommitHeraldWorker
$commit->getPHID(), $commit->getPHID(),
)); ));
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); // TODO: This is complicated and needs to be sorted out properly for
// repository policy stuff. We might need an omniscient user here?
$viewer = new PhabricatorUser();
$handles = id(new PhabricatorObjectHandleData($phids))
->setViewer($viewer)
->loadHandles();
$commit_handle = $handles[$commit->getPHID()]; $commit_handle = $handles[$commit->getPHID()];
$commit_name = $commit_handle->getName(); $commit_name = $commit_handle->getName();