fix(docker/containers): show sysctl control (#5051)

pull/5080/head
Chaim Lev-Ari 4 years ago committed by GitHub
parent 3641158daf
commit a21798f518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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"`
}

@ -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() {

Loading…
Cancel
Save