🔀 Merge pull request #900 from Cereal916/disableConfigurationForNonAdmin
Add config option to disable all UI config features for non admin users.
This commit is contained in:
@@ -107,7 +107,8 @@ const store = new Vuex.Store({
|
||||
perms.allowWriteToDisk = false;
|
||||
}
|
||||
// Disable everything
|
||||
if (appConfig.disableConfiguration) {
|
||||
if (appConfig.disableConfiguration
|
||||
|| (appConfig.disableConfigurationForNonAdmin && !isUserAdmin())) {
|
||||
perms.allowWriteToDisk = false;
|
||||
perms.allowSaveLocally = false;
|
||||
perms.allowViewConfig = false;
|
||||
|
||||
@@ -509,6 +509,12 @@
|
||||
"default": false,
|
||||
"description": "If set to true, no users will be able to view or edit the config through the UI"
|
||||
},
|
||||
"disableConfigurationForNonAdmin": {
|
||||
"title": "Disable all UI Config for non admin users.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "If set to true, only admin users will be able to view or edit the config through the UI. disableConfiguration must not be set to true."
|
||||
},
|
||||
"allowConfigEdit": {
|
||||
"title": "Allow Config Editing",
|
||||
"type": "boolean",
|
||||
|
||||
Reference in New Issue
Block a user