remove user registration settings (#3832)

* can be re-activated through kimai.yaml
This commit is contained in:
Kevin Papst
2023-02-07 19:36:10 +01:00
committed by GitHub
parent 8095ae298f
commit d481f68266
9 changed files with 62 additions and 41 deletions

View File

@@ -278,13 +278,18 @@ final class SystemConfigurationController extends AbstractController
->setType(IntegerType::class),
]);
$allowRegistration = $this->systemConfiguration->find('features.user_registration');
if ($allowRegistration === false) {
$authentication->getConfigurationByName('user.registration')?->setEnabled(false);
}
if (!$this->systemConfiguration->isSamlActive()) {
$authentication->getConfigurationByName('user.login')->setEnabled(false);
$authentication->getConfigurationByName('user.login')?->setEnabled(false);
}
if (!$this->systemConfiguration->isPasswordResetActive()) {
$authentication->getConfigurationByName('user.password_reset_retry_ttl')->setEnabled(false);
$authentication->getConfigurationByName('user.password_reset_token_ttl')->setEnabled(false);
$authentication->getConfigurationByName('user.password_reset_retry_ttl')?->setEnabled(false);
$authentication->getConfigurationByName('user.password_reset_token_ttl')?->setEnabled(false);
}
return [