Page MenuHomePhabricator

D11959.diff
No OneTemporary

D11959.diff

diff --git a/src/applications/fund/storage/FundInitiative.php b/src/applications/fund/storage/FundInitiative.php
--- a/src/applications/fund/storage/FundInitiative.php
+++ b/src/applications/fund/storage/FundInitiative.php
@@ -125,7 +125,21 @@
}
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
- return ($viewer->getPHID() == $this->getOwnerPHID());
+ if ($viewer->getPHID() == $this->getOwnerPHID()) {
+ return true;
+ }
+
+ if ($capability == PhabricatorPolicyCapability::CAN_VIEW) {
+ foreach ($viewer->getAuthorities() as $authority) {
+ if ($authority instanceof PhortuneMerchant) {
+ if ($authority->getPHID() == $this->getMerchantPHID()) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
}
public function describeAutomaticCapability($capability) {

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 1:56 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722318
Default Alt Text
D11959.diff (881 B)

Event Timeline