mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 23:39:41 +02:00
feat(settings): add a setting to disable bind mounts for non-admins (#1237)
* feat(settings): add a setting to disable bind mounts for non-admins * refactor(gruntfile): remove temporary setting
This commit is contained in:
parent
6cfffb38f9
commit
ca9d9b9a77
14 changed files with 105 additions and 35 deletions
|
@ -6,6 +6,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
customLogo: false,
|
||||
customTemplates: false,
|
||||
externalContributions: false,
|
||||
restrictBindMounts: false,
|
||||
labelName: '',
|
||||
labelValue: ''
|
||||
};
|
||||
|
@ -39,6 +40,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
settings.TemplatesURL = DEFAULT_TEMPLATES_URL;
|
||||
}
|
||||
settings.DisplayExternalContributors = !$scope.formValues.externalContributions;
|
||||
settings.AllowBindMountsForRegularUsers = !$scope.formValues.restrictBindMounts;
|
||||
|
||||
updateSettings(settings, false);
|
||||
};
|
||||
|
@ -81,6 +83,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
|
|||
$scope.formValues.customTemplates = true;
|
||||
}
|
||||
$scope.formValues.externalContributions = !settings.DisplayExternalContributors;
|
||||
$scope.formValues.restrictBindMounts = !settings.AllowBindMountsForRegularUsers;
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to retrieve application settings');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue