Summary: Fixes T2630 Test Plan: Did not test yet. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2630 Differential Revision: https://secure.phabricator.com/D5456
38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
|
|
|
final class PhabricatorSetupCheckFacebook extends PhabricatorSetupCheck {
|
|
|
|
protected function executeChecks() {
|
|
$fb_auth = PhabricatorEnv::getEnvConfig('facebook.auth-enabled');
|
|
if (!$fb_auth) {
|
|
return;
|
|
}
|
|
|
|
if (!PhabricatorEnv::getEnvConfig('facebook.application-id')) {
|
|
$message = pht(
|
|
'You have enabled Facebook authentication, but have not provided a '.
|
|
'Facebook Application ID. Provide one or disable Facebook '.
|
|
'authentication.');
|
|
|
|
$this->newIssue('config.facebook.application-id')
|
|
->setName(pht("Facebook Application ID Not Set"))
|
|
->setMessage($message)
|
|
->addRelatedPhabricatorConfig('facebook.auth-enabled')
|
|
->addPhabricatorConfig('facebook.application-id');
|
|
}
|
|
|
|
if (!PhabricatorEnv::getEnvConfig('facebook.application-secret')) {
|
|
$message = pht(
|
|
'You have enabled Facebook authentication, but have not provided a '.
|
|
'Facebook Application Secret. Provide one or disable Facebook '.
|
|
'authentication.');
|
|
|
|
$this->newIssue('config.facebook.application-secret')
|
|
->setName(pht("Facebook Application Secret Not Set"))
|
|
->setMessage($message)
|
|
->addRelatedPhabricatorConfig('facebook.auth-enabled')
|
|
->addPhabricatorConfig('facebook.application-secret');
|
|
}
|
|
}
|
|
}
|