diff --git a/interface/web/remote/json.php b/interface/web/remote/json.php index a7bad846c347f2f38925e6b3aa11245e2ed0e5b0..17bc41cd3b94c2ab09f0e4666716d5f2ca2bf73d 100644 --- a/interface/web/remote/json.php +++ b/interface/web/remote/json.php @@ -4,7 +4,13 @@ require_once '../../lib/config.inc.php'; $conf['start_session'] = false; require_once '../../lib/app.inc.php'; -$app->load('json_handler'); +if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.'); + +$app->load('json_handler,getconf'); + +$security_config = $app->getconf->get_security_config('permissions'); +if($security_config['remote_api_allowed'] != 'yes') die('Remote API is disabled in security settings.'); + $json_handler = new ISPConfigJSONHandler(); $json_handler->run();