1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-01 18:30:59 +01:00

Fix Phortune so it allows users to create their accounts implicitly

Summary: This is a small fix for Phortune so that policies don't prevent the user accounts from being implicitly created when they first visit Phortune.

Test Plan: Visited Phortune and it worked.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7758
This commit is contained in:
James Rhodes 2013-12-12 11:19:03 +11:00
parent 61c934449d
commit 1d9bf6f82b

View file

@ -46,7 +46,12 @@ final class PhortuneAccount extends PhortuneDAO
} }
public function getPolicy($capability) { 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) { public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {