mirror of https://github.com/Lissy93/dashy.git
🛂 Prevent download config when (#455)
This commit is contained in:
parent
cfe3a48405
commit
c1607cb19b
|
@ -1,12 +1,17 @@
|
|||
<template>
|
||||
<pre><code>{{ yamlConfig }}</code></pre>
|
||||
<pre v-if="allowViewConfig"><code>{{ yamlConfig }}</code></pre>
|
||||
<AccessError v-else />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JsYaml from 'js-yaml';
|
||||
import AccessError from '@/components/Configuration/AccessError';
|
||||
|
||||
export default {
|
||||
name: 'DownloadConfig',
|
||||
components: {
|
||||
AccessError,
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.config;
|
||||
|
@ -14,6 +19,9 @@ export default {
|
|||
yamlConfig() {
|
||||
return JsYaml.dump(this.config);
|
||||
},
|
||||
allowViewConfig() {
|
||||
return this.$store.getters.permissions.allowViewConfig;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue