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

Update a straggling "getAuthorities()" call in Fund

Summary: Ref T13366. The "authorities" mechanism was replaced, but I missed this callsite. Update it to use the request cache mechanism.

Test Plan: As a user without permission to view some initiatives, viewed a list of initiatives.

Maniphest Tasks: T13366

Differential Revision: https://secure.phabricator.com/D20783
This commit is contained in:
epriestley 2019-09-04 07:09:39 -07:00
parent 22b075df97
commit f7290bbbf2

View file

@ -136,12 +136,12 @@ final class FundInitiative extends FundDAO
} }
if ($capability == PhabricatorPolicyCapability::CAN_VIEW) { if ($capability == PhabricatorPolicyCapability::CAN_VIEW) {
foreach ($viewer->getAuthorities() as $authority) { $can_merchant = PhortuneMerchantQuery::canViewersEditMerchants(
if ($authority instanceof PhortuneMerchant) { array($viewer->getPHID()),
if ($authority->getPHID() == $this->getMerchantPHID()) { array($this->getMerchantPHID()));
return true;
} if ($can_merchant) {
} return true;
} }
} }