mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-26 18:21:02 +00:00
Use fosuser_registration directly instead of wallabag_user.registration_enabled
This commit is contained in:
parent
935070f2a5
commit
5a55a64fee
6 changed files with 3 additions and 15 deletions
|
@ -178,9 +178,6 @@ wallabag_core:
|
||||||
-
|
-
|
||||||
rule: _all ~ "https?://www\.lemonde\.fr/tiny.*"
|
rule: _all ~ "https?://www\.lemonde\.fr/tiny.*"
|
||||||
|
|
||||||
wallabag_user:
|
|
||||||
registration_enabled: "%fosuser_registration%"
|
|
||||||
|
|
||||||
wallabag_import:
|
wallabag_import:
|
||||||
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv']
|
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv']
|
||||||
resource_dir: "%kernel.project_dir%/web/uploads/import"
|
resource_dir: "%kernel.project_dir%/web/uploads/import"
|
||||||
|
|
|
@ -39,7 +39,7 @@ class WallabagRestController extends AbstractFOSRestController
|
||||||
$info = [
|
$info = [
|
||||||
'appname' => 'wallabag',
|
'appname' => 'wallabag',
|
||||||
'version' => $this->container->getParameter('wallabag_core.version'),
|
'version' => $this->container->getParameter('wallabag_core.version'),
|
||||||
'allowed_registration' => $this->container->getParameter('wallabag_user.registration_enabled'),
|
'allowed_registration' => $this->container->getParameter('fosuser_registration'),
|
||||||
];
|
];
|
||||||
|
|
||||||
return (new JsonResponse())->setJson($this->get('jms_serializer')->serialize($info, 'json'));
|
return (new JsonResponse())->setJson($this->get('jms_serializer')->serialize($info, 'json'));
|
||||||
|
|
|
@ -9,7 +9,7 @@ class RegistrationController extends FOSRegistrationController
|
||||||
{
|
{
|
||||||
public function registerAction(Request $request)
|
public function registerAction(Request $request)
|
||||||
{
|
{
|
||||||
if ($this->container->getParameter('wallabag_user.registration_enabled')) {
|
if ($this->container->getParameter('fosuser_registration')) {
|
||||||
return parent::registerAction($request);
|
return parent::registerAction($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class SecurityController extends FOSSecurityController
|
||||||
return $this->render('FOSUserBundle:Security:login.html.twig',
|
return $this->render('FOSUserBundle:Security:login.html.twig',
|
||||||
array_merge(
|
array_merge(
|
||||||
$data,
|
$data,
|
||||||
['registration_enabled' => $this->container->getParameter('wallabag_user.registration_enabled')]
|
['registration_enabled' => $this->container->getParameter('fosuser_registration')]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,6 @@ class Configuration implements ConfigurationInterface
|
||||||
$treeBuilder = new TreeBuilder();
|
$treeBuilder = new TreeBuilder();
|
||||||
$rootNode = $treeBuilder->root('wallabag_user');
|
$rootNode = $treeBuilder->root('wallabag_user');
|
||||||
|
|
||||||
$rootNode
|
|
||||||
->children()
|
|
||||||
->booleanNode('registration_enabled')
|
|
||||||
->defaultValue(true)
|
|
||||||
->end()
|
|
||||||
->end()
|
|
||||||
;
|
|
||||||
|
|
||||||
return $treeBuilder;
|
return $treeBuilder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@ class WallabagUserExtension extends Extension
|
||||||
|
|
||||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||||
$loader->load('services.yml');
|
$loader->load('services.yml');
|
||||||
$container->setParameter('wallabag_user.registration_enabled', $config['registration_enabled']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAlias()
|
public function getAlias()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue