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:
parent
61c934449d
commit
1d9bf6f82b
1 changed files with 6 additions and 1 deletions
|
@ -46,8 +46,13 @@ final class PhortuneAccount extends PhortuneDAO
|
|||
}
|
||||
|
||||
public function getPolicy($capability) {
|
||||
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) {
|
||||
$members = array_fuse($this->getMemberPHIDs());
|
||||
|
|
Loading…
Reference in a new issue