From a954f8c0fbdb551281ccbefa44a5c926007e6d0b Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 19 Jun 2021 13:54:48 +0100 Subject: [PATCH] Adds new property, `appConfig.allowConfigEdit`, in order to allow / prevent the user from writing changes to the conf file from the UI --- docs/configuring.md | 1 + src/utils/ConfigSchema.json | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/configuring.md b/docs/configuring.md index 938f52c0..077682ec 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -58,6 +58,7 @@ All fields are optional, unless otherwise stated. **`customCss`** | `string` | _Optional_ | Raw CSS that will be applied to the page. This can also be set from the UI. Please minify it first. **`showSplashScreen`** | `boolean` | _Optional_ | Should display a splash screen while the app is loading. Defaults to false, except on first load **`auth`** | `array` | _Optional_ | An array of objects containing usernames and hashed passwords. If this is not provided, then authentication will be off by default, and you will not need any credentials to access the app. Note authentication is done on the client side, and so if your instance of Dashy is exposed to the internet, it is recommend to configure your web server to handle this. See [`auth`](#appconfigauth-optional) +**`allowConfigEdit`** | `boolean` | _Optional_ | Should prevent / allow the user to write configuration changes to the conf.yml from the UI. When set to `false`, the user can only apply changes locally using the config editor within the app, whereas if set to `true` then changes can be written to disk directly through the UI. Defaults to `true`. Note that if authentication is enabled, the user must be of type `admin` in order to apply changes globally. **[⬆️ Back to Top](#configuring)** diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 1f458dfa..1b89dc8b 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -150,6 +150,11 @@ } } } + }, + "allowConfigEdit": { + "type": "boolean", + "default": true, + "description": "Can user write changes to conf.yml file from the UI. If set to false, preferences are only stored locally" } }, "additionalProperties": false