From 9edea9976bd605071e0694a90d704266c0b7e0f9 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 14 Aug 2014 11:30:03 -0400
Subject: [PATCH] - Added warning in the interface when a path for a shelluser is set that is outside of the website docroot. - Added security settings feature to allow the root user of a server to control most aspects of whet the admin user of the controlpanel is allowed to do in system settings. This is especially useful for managed severs where the ispconfig admin user and the root user of the server are different persons.

---
 interface/web/remote/index.php |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/interface/web/remote/index.php b/interface/web/remote/index.php
index d60a1c9..c7ad8a9 100644
--- a/interface/web/remote/index.php
+++ b/interface/web/remote/index.php
@@ -6,7 +6,11 @@
 
 if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
 
-$app->load('remoting');
+$app->load('remoting,getconf');
+
+$security_config = $app->getconf->get_security_config('permissions');
+if($security_config['remote_api_allowed'] != 'yes') die('Remote API is disabled in security settings.');
+
 
 $server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
 $server->setClass('remoting');

--
Gitblit v1.9.1