mirror of https://github.com/Lissy93/dashy.git
🛂 Only authenticated users should be able to W2D
This commit is contained in:
parent
a88e899f53
commit
fb73f0e154
|
@ -24,6 +24,7 @@
|
|||
</Button>
|
||||
<Button
|
||||
:click="writeToDisk"
|
||||
:disabled="!allowWriteToDisk"
|
||||
v-tooltip="tooltip($t('interactive-editor.menu.save-disk-tooltip'))"
|
||||
>
|
||||
{{ $t('interactive-editor.menu.save-disk-btn') }}
|
||||
|
@ -95,6 +96,7 @@ import EditPageInfo from '@/components/InteractiveEditor/EditPageInfo';
|
|||
import EditAppConfig from '@/components/InteractiveEditor/EditAppConfig';
|
||||
import { modalNames, localStorageKeys, serviceEndpoints } from '@/utils/defaults';
|
||||
import ErrorHandler, { InfoHandler } from '@/utils/ErrorHandler';
|
||||
import { isUserAdmin } from '@/utils/Auth';
|
||||
|
||||
import SaveLocallyIcon from '@/assets/interface-icons/interactive-editor-save-locally.svg';
|
||||
import SaveToDiskIcon from '@/assets/interface-icons/interactive-editor-save-disk.svg';
|
||||
|
@ -124,6 +126,10 @@ export default {
|
|||
config() {
|
||||
return this.$store.state.config;
|
||||
},
|
||||
allowWriteToDisk() {
|
||||
const { appConfig } = this.config;
|
||||
return appConfig.allowConfigEdit !== false && isUserAdmin();
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue