1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 16:00:59 +01:00

When evaluating the "Branches" Herald field from the test console, use the current viewer

Summary: Ref T13093. Depends on D19145. See PHI398. Previously, see D18933. This provides the current viewer to `ConduitCall` so that we don't try to use device credentials from unprivileged web hosts.

Test Plan: Evaluated the "Branches" field locally, saw an appropriate field value.

Maniphest Tasks: T13093

Differential Revision: https://secure.phabricator.com/D19146
This commit is contained in:
epriestley 2018-02-27 14:10:29 -08:00
parent 80fe382e3d
commit 8cbfb386bb

View file

@ -10,6 +10,8 @@ final class DiffusionCommitBranchesHeraldField
}
public function getHeraldFieldValue($object) {
$viewer = $this->getAdapter()->getViewer();
$commit = $object;
$repository = $object->getRepository();
@ -19,7 +21,7 @@ final class DiffusionCommitBranchesHeraldField
);
$result = id(new ConduitCall('diffusion.branchquery', $params))
->setUser(PhabricatorUser::getOmnipotentUser())
->setUser($viewer)
->execute();
$refs = DiffusionRepositoryRef::loadAllFromDictionaries($result);