remove user registration settings (#3832)
* can be re-activated through kimai.yaml
This commit is contained in:
@@ -69,19 +69,16 @@ final class AppExtension extends Extension
|
||||
}
|
||||
|
||||
// this should happen always at the end, so bundles do not mess with the base configuration
|
||||
/* @phpstan-ignore-next-line */
|
||||
if ($container->hasParameter('kimai.bundles.config')) {
|
||||
if ($container->hasParameter('kimai.bundles.config')) { // @phpstan-ignore-line
|
||||
$bundleConfig = $container->getParameter('kimai.bundles.config');
|
||||
if (!\is_array($bundleConfig)) {
|
||||
trigger_error('Invalid bundle configuration found, skipping all bundle configuration');
|
||||
} else {
|
||||
foreach ($bundleConfig as $key => $value) {
|
||||
if (\array_key_exists($key, $config)) {
|
||||
trigger_error(sprintf('Invalid bundle configuration "%s" found, skipping', $key));
|
||||
continue;
|
||||
}
|
||||
$config[$key] = $value;
|
||||
throw new \Exception('Invalid bundle configuration found, skipping all bundle configuration');
|
||||
}
|
||||
foreach ($bundleConfig as $key => $value) {
|
||||
if (\array_key_exists($key, $config)) {
|
||||
throw new \Exception(sprintf('Invalid bundle configuration "%s" found, skipping', $key));
|
||||
}
|
||||
$config[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,32 @@ final class Configuration implements ConfigurationInterface
|
||||
->append($this->getQuickEntryNode())
|
||||
->append($this->getActivityNode())
|
||||
->append($this->getProjectNode())
|
||||
->append($this->getFeaturesNode())
|
||||
->end()
|
||||
->end();
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
||||
private function getFeaturesNode(): ArrayNodeDefinition
|
||||
{
|
||||
$builder = new TreeBuilder('features');
|
||||
/** @var ArrayNodeDefinition $node */
|
||||
$node = $builder->getRootNode();
|
||||
|
||||
$node
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
// this feature was deactivated in order to deprecate/remove it in the future, very likely not necessary for anyone
|
||||
->integerNode('user_registration')
|
||||
->defaultFalse()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
private function getQuickEntryNode(): ArrayNodeDefinition
|
||||
{
|
||||
$builder = new TreeBuilder('quick_entry');
|
||||
|
||||
Reference in New Issue
Block a user