diff --git a/src/views/services.html b/src/views/services.html
index eab1b0b4e..3e495c5e2 100644
--- a/src/views/services.html
+++ b/src/views/services.html
@@ -18,6 +18,17 @@
+
+
@@ -95,7 +106,7 @@
{{ service.config.memorySwap | prettyByteSize }}
-
+
|
@@ -123,7 +134,7 @@
{{ service.config.memorySwap | prettyByteSize }}
-
+
|
diff --git a/src/views/services.js b/src/views/services.js
index acc7fb54c..2fa00bc82 100644
--- a/src/views/services.js
+++ b/src/views/services.js
@@ -59,6 +59,9 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca
memoryLimit: 0,
memoryTicks: [],
+ // sftp only
+ requireAdmin: true,
+
show: function (service) {
$scope.serviceConfigure.reset();
@@ -76,6 +79,8 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca
$scope.serviceConfigure.memoryTicks.push(i * 1024 * 1024);
}
+ if (service.name === 'sftp') $scope.serviceConfigure.requireAdmin = !!service.config.requireAdmin;
+
$('#serviceConfigureModal').modal('show');
},
@@ -83,7 +88,10 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca
$scope.serviceConfigure.busy = true;
$scope.serviceConfigure.error = null;
- Client.configureService($scope.serviceConfigure.service.name, { memorySwap: memoryLimit, memory: memoryLimit/2 }, function (error) {
+ var data = { memorySwap: memoryLimit, memory: memoryLimit/2 };
+ if ($scope.serviceConfigure.service.name === 'sftp') data.requireAdmin = $scope.serviceConfigure.requireAdmin;
+
+ Client.configureService($scope.serviceConfigure.service.name, data, function (error) {
$scope.serviceConfigure.busy = false;
if (error) {
$scope.serviceConfigure.error = error.message;