forked from wallabag/wallabag
API user creation behing a toggle
I've added a toggle feature (in internal settings) so that user api creation can be disabled while form registration still can be enabled. Also, the /api/user endpoint shouldn't require authentication. Even if we check the authentication when sending a GET request, to retrieve current user information. I've moved all the internal settings definition to config to avoid duplicated place to define them. I don't know why we didn't did that earlier.
This commit is contained in:
@ -52,6 +52,17 @@ class Configuration implements ConfigurationInterface
|
||||
->scalarNode('api_limit_mass_actions')
|
||||
->defaultValue(10)
|
||||
->end()
|
||||
->arrayNode('default_internal_settings')
|
||||
->prototype('array')
|
||||
->children()
|
||||
->scalarNode('name')->end()
|
||||
->scalarNode('value')->end()
|
||||
->enumNode('section')
|
||||
->values(['entry', 'misc', 'api', 'analytics', 'export', 'import'])
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user