Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13967486
D11959.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
881 B
Referenced Files
None
Subscribers
None
D11959.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11959: Recognize merchant authority in Fund initiatives
Attached
Detach File
Event Timeline
Log In to Comment