mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
AuthenticationController: show friendlier hints...
...while not disclosing sensitive information. More to come once we have our setup wizard. fixes #6534
This commit is contained in:
parent
ba748cbc4a
commit
736113c80c
@ -54,13 +54,9 @@ class AuthenticationController extends ActionController
|
|||||||
try {
|
try {
|
||||||
$config = Config::app('authentication');
|
$config = Config::app('authentication');
|
||||||
} catch (NotReadableError $e) {
|
} catch (NotReadableError $e) {
|
||||||
Logger::error(
|
|
||||||
new Exception('Cannot load authentication configuration. An exception was thrown:', 0, $e)
|
|
||||||
);
|
|
||||||
throw new ConfigurationError(
|
throw new ConfigurationError(
|
||||||
t(
|
$this->translate(
|
||||||
'No authentication methods available. Authentication configuration could not be loaded.'
|
'Could not read your authentiction.ini, no authentication methods are available.'
|
||||||
. ' Please check the system log or Icinga Web 2 log for more information'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -110,25 +106,25 @@ class AuthenticationController extends ActionController
|
|||||||
}
|
}
|
||||||
if ($backendsTried === 0) {
|
if ($backendsTried === 0) {
|
||||||
throw new ConfigurationError(
|
throw new ConfigurationError(
|
||||||
t(
|
$this->translate(
|
||||||
'No authentication methods available. It seems that no authentication method has been set'
|
'No authentication methods available. Did you create'
|
||||||
. ' up. Please check the system log or Icinga Web 2 log for more information'
|
. ' authentication.ini when installing Icinga Web 2?'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($backendsTried === $backendsWithError) {
|
if ($backendsTried === $backendsWithError) {
|
||||||
throw new ConfigurationError(
|
throw new ConfigurationError(
|
||||||
$this->translate(
|
$this->translate(
|
||||||
'No authentication methods available. It seems that all set up authentication methods have'
|
'All configured authentication methods failed.'
|
||||||
. ' errors. Please check the system log or Icinga Web 2 log for more information'
|
. ' Please check the system log or Icinga Web 2 log for more information.'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($backendsWithError) {
|
if ($backendsWithError) {
|
||||||
$form->addNote(
|
$form->addNote(
|
||||||
$this->translate(
|
$this->translate(
|
||||||
'Note that not all authentication backends are available for authentication because they'
|
'Please note that not all authentication methods where available.'
|
||||||
. ' have errors. Please check the system log or Icinga Web 2 log for more information'
|
. ' Check the system log or Icinga Web 2 log for more information.'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user