Page MenuHomePhabricator

D11959.id28811.diff
No OneTemporary

D11959.id28811.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
Sat, Oct 19, 7:22 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722318
Default Alt Text
D11959.id28811.diff (881 B)

Event Timeline