Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F89046
D7758.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
666 B
Referenced Files
None
Subscribers
None
D7758.diff
View Options
diff --git a/src/applications/phortune/storage/PhortuneAccount.php b/src/applications/phortune/storage/PhortuneAccount.php
--- a/src/applications/phortune/storage/PhortuneAccount.php
+++ b/src/applications/phortune/storage/PhortuneAccount.php
@@ -46,7 +46,12 @@
}
public function getPolicy($capability) {
- return PhabricatorPolicies::POLICY_NOONE;
+ if ($this->getPHID() === null) {
+ // Allow a user to create an account for themselves.
+ return PhabricatorPolicies::POLICY_USER;
+ } else {
+ return PhabricatorPolicies::POLICY_NOONE;
+ }
}
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/a6/kd/5vqlch62antrvk6j
Default Alt Text
D7758.diff (666 B)
Attached To
Mode
D7758: Fix Phortune so it allows users to create their accounts implicitly
Attached
Detach File
Event Timeline
Log In to Comment