mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
Fix configuration setting access
This commit is contained in:
@@ -38,7 +38,7 @@ class OAuth2 implements ControllerProviderInterface, ServiceProviderInterface
|
||||
/** @var PropertyAccess $config */
|
||||
$config = $app['conf'];
|
||||
|
||||
if ($config->get('api_disable', false) == true) {
|
||||
if ($config->get([ 'main', 'api_disable' ], false) == true) {
|
||||
return $app['controllers_factory'];
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ class V1 implements ControllerProviderInterface, ServiceProviderInterface
|
||||
/** @var PropertyAccess $config */
|
||||
$config = $app['conf'];
|
||||
|
||||
if ($config->get('api_disable', false) == true) {
|
||||
if ($config->get([ 'main', 'api_disable' ], false) == true) {
|
||||
return $app['controllers_factory'];
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,7 @@ class V2 implements ControllerProviderInterface, ServiceProviderInterface
|
||||
/** @var PropertyAccess $config */
|
||||
$config = $app['conf'];
|
||||
|
||||
if ($config->get('api_disable', false) == true) {
|
||||
if ($config->get([ 'main', 'api_disable' ], false) == true) {
|
||||
return $app['controllers_factory'];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user