🛂 Prevent download config when (#455)
This commit is contained in:
@@ -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;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user