[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorSetupCheckAuth extends PhabricatorSetupCheck { 4 5 protected function executeChecks() { 6 // NOTE: We're not actually building these providers. Building providers 7 // can require additional configuration to be present (e.g., to build 8 // redirect and login URIs using `phabricator.base-uri`) and it won't 9 // necessarily be available when running setup checks. 10 11 // Since this check is only meant as a hint to new administrators about 12 // steps they should take, we don't need to be thorough about checking 13 // that providers are enabled, available, correctly configured, etc. As 14 // long as they've created some kind of provider in the auth app before, 15 // they know that it exists and don't need the hint to go check it out. 16 17 $configs = id(new PhabricatorAuthProviderConfigQuery()) 18 ->setViewer(PhabricatorUser::getOmnipotentUser()) 19 ->execute(); 20 21 if (!$configs) { 22 $message = pht( 23 'You have not configured any authentication providers yet. You '. 24 'should add a provider (like username/password, LDAP, or GitHub '. 25 'OAuth) so users can register and log in. You can add and configure '. 26 'providers %s.', 27 phutil_tag( 28 'a', 29 array( 30 'href' => '/auth/', 31 ), 32 pht('using the "Auth" application'))); 33 34 $this 35 ->newIssue('auth.noproviders') 36 ->setShortName(pht('No Auth Providers')) 37 ->setName(pht('No Authentication Providers Configured')) 38 ->setMessage($message); 39 } 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |