mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-04 20:52:43 +01:00
(stable) 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:
parent
24dbff241b
commit
0c3f59fd68
1 changed files with 6 additions and 6 deletions
|
@ -136,14 +136,14 @@ final class FundInitiative extends FundDAO
|
|||
}
|
||||
|
||||
if ($capability == PhabricatorPolicyCapability::CAN_VIEW) {
|
||||
foreach ($viewer->getAuthorities() as $authority) {
|
||||
if ($authority instanceof PhortuneMerchant) {
|
||||
if ($authority->getPHID() == $this->getMerchantPHID()) {
|
||||
$can_merchant = PhortuneMerchantQuery::canViewersEditMerchants(
|
||||
array($viewer->getPHID()),
|
||||
array($this->getMerchantPHID()));
|
||||
|
||||
if ($can_merchant) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue