From a21798f51809fc23d9ed490247a6c2c82d7f4097 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Wed, 12 May 2021 03:29:35 +0300 Subject: [PATCH] fix(docker/containers): show sysctl control (#5051) --- api/portainer.go | 2 +- .../views/containers/create/createContainerController.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/portainer.go b/api/portainer.go index 0f6a72568..e0fd9b08d 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -336,7 +336,7 @@ type ( // Whether non-administrator should be able to use container capabilities AllowContainerCapabilitiesForRegularUsers bool `json:"allowContainerCapabilitiesForRegularUsers" example:"true"` // Whether non-administrator should be able to use sysctl settings - AllowSysctlSettingForRegularUsers bool `json:"AllowSysctlSettingForRegularUsers" example:"true"` + AllowSysctlSettingForRegularUsers bool `json:"allowSysctlSettingForRegularUsers" example:"true"` // Whether host management features are enabled EnableHostManagementFeatures bool `json:"enableHostManagementFeatures" example:"true"` } diff --git a/app/docker/views/containers/create/createContainerController.js b/app/docker/views/containers/create/createContainerController.js index 768d1e589..19965b7ae 100644 --- a/app/docker/views/containers/create/createContainerController.js +++ b/app/docker/views/containers/create/createContainerController.js @@ -972,9 +972,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [ } async function shouldShowSysctls() { - const { allowSysctlSettingForRegularUsers } = $scope.applicationState.application; - - return allowSysctlSettingForRegularUsers || Authentication.isAdmin(); + return endpoint.SecuritySettings.allowSysctlSettingForRegularUsers || Authentication.isAdmin(); } async function checkIfContainerCapabilitiesEnabled() {