Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthStartController.php
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | if (!$providers) { | ||||
// If this is a fresh install, let the user register their admin | // If this is a fresh install, let the user register their admin | ||||
// account. | // account. | ||||
return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
->setURI($this->getApplicationURI('/register/')); | ->setURI($this->getApplicationURI('/register/')); | ||||
} | } | ||||
return $this->renderError( | return $this->renderError( | ||||
pht( | pht( | ||||
'This Phabricator install is not configured with any enabled '. | 'This %s install is not configured with any enabled '. | ||||
'authentication providers which can be used to log in. If you '. | 'authentication providers which can be used to log in. If you '. | ||||
'have accidentally locked yourself out by disabling all providers, '. | 'have accidentally locked yourself out by disabling all providers, '. | ||||
'you can use `%s` to recover access to an account.', | 'you can use `%s` to recover access to an account.', | ||||
'phabricator/bin/auth recover <username>')); | 'phabricator/bin/auth recover <username>', | ||||
PhabricatorPlatformSite::getName())); | |||||
} | } | ||||
$next_uri = $request->getStr('next'); | $next_uri = $request->getStr('next'); | ||||
if (!strlen($next_uri)) { | if (!strlen($next_uri)) { | ||||
if ($this->getDelegatingController()) { | if ($this->getDelegatingController()) { | ||||
// Only set a next URI from the request path if this controller was | // Only set a next URI from the request path if this controller was | ||||
// delegated to, which happens when a user tries to view a page which | // delegated to, which happens when a user tries to view a page which | ||||
// requires them to login. | // requires them to login. | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | private function processConduitRequest() { | ||||
// effort to give them a comprehensible error message. | // effort to give them a comprehensible error message. | ||||
$request_path = $this->getRequest()->getPath(); | $request_path = $this->getRequest()->getPath(); | ||||
$conduit_path = '/api/<method>'; | $conduit_path = '/api/<method>'; | ||||
$example_path = '/api/conduit.ping'; | $example_path = '/api/conduit.ping'; | ||||
$message = pht( | $message = pht( | ||||
'ERROR: You are making a Conduit API request to "%s", but the correct '. | 'ERROR: You are making a Conduit API request to "%s", but the correct '. | ||||
'HTTP request path to use in order to access a COnduit method is "%s" '. | 'HTTP request path to use in order to access a Conduit method is "%s" '. | ||||
'(for example, "%s"). Check your configuration.', | '(for example, "%s"). Check your configuration.', | ||||
$request_path, | $request_path, | ||||
$conduit_path, | $conduit_path, | ||||
$example_path); | $example_path); | ||||
return id(new AphrontPlainTextResponse())->setContent($message); | return id(new AphrontPlainTextResponse())->setContent($message); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0