From de3d716ae4e8ca98dabdcb2ec9c18219e05856f7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 2 Jul 2016 14:35:52 +0200 Subject: Add option to disable registration --- src/Wallabag/UserBundle/DependencyInjection/Configuration.php | 8 ++++++++ .../UserBundle/DependencyInjection/WallabagUserExtension.php | 1 + 2 files changed, 9 insertions(+) (limited to 'src/Wallabag/UserBundle/DependencyInjection') diff --git a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php index 4223f8db..971ce1a0 100644 --- a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php @@ -12,6 +12,14 @@ class Configuration implements ConfigurationInterface $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('wallabag_user'); + $rootNode + ->children() + ->booleanNode('registration_enabled') + ->defaultValue(true) + ->end() + ->end() + ; + return $treeBuilder; } } diff --git a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php index c12a8937..99040f69 100644 --- a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php +++ b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php @@ -16,6 +16,7 @@ class WallabagUserExtension extends Extension $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); + $container->setParameter('wallabag_user.registration_enabled', $config['registration_enabled']); } public function getAlias() -- cgit v1.2.3