mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
Module: Expect user and group backends upon registration
Providing a user or user group backend in configuration.php now has no effect anymore. They are expected to be announced in run.php, just like hooks. A warning appears in the log for cases where a configuration.php still attempts it. Should help with troubleshooting since it will appear after an error that a specific backend has not been found. refs #5265
This commit is contained in:
parent
fff524624e
commit
dadff36660
@ -1068,7 +1068,6 @@ class Module
|
||||
*/
|
||||
public function getUserBackends()
|
||||
{
|
||||
$this->launchConfigScript();
|
||||
return $this->userBackends;
|
||||
}
|
||||
|
||||
@ -1079,7 +1078,6 @@ class Module
|
||||
*/
|
||||
public function getUserGroupBackends()
|
||||
{
|
||||
$this->launchConfigScript();
|
||||
return $this->userGroupBackends;
|
||||
}
|
||||
|
||||
@ -1180,6 +1178,14 @@ class Module
|
||||
*/
|
||||
protected function provideUserBackend($identifier, $className)
|
||||
{
|
||||
if ($this->registered) {
|
||||
Logger::warning(
|
||||
'Module "%s" already registered. Providing user backend "%s" at this stage has no effect.',
|
||||
$this->getName(),
|
||||
$identifier
|
||||
);
|
||||
}
|
||||
|
||||
$this->userBackends[strtolower($identifier)] = $className;
|
||||
return $this;
|
||||
}
|
||||
@ -1194,6 +1200,14 @@ class Module
|
||||
*/
|
||||
protected function provideUserGroupBackend($identifier, $className)
|
||||
{
|
||||
if ($this->registered) {
|
||||
Logger::warning(
|
||||
'Module "%s" already registered. Providing user group backend "%s" at this stage has no effect.',
|
||||
$this->getName(),
|
||||
$identifier
|
||||
);
|
||||
}
|
||||
|
||||
$this->userGroupBackends[strtolower($identifier)] = $className;
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user