diff --git a/frontend/components/ConfigChannel.vue b/frontend/components/ConfigChannel.vue index c8f9a93f..654e4073 100644 --- a/frontend/components/ConfigChannel.vue +++ b/frontend/components/ConfigChannel.vue @@ -222,7 +222,10 @@ async function addUpdateChannel() { await updateChannel() } - await configStore.getAdvancedConfig() + if (authStore.role === 'GlobalAdmin') { + await configStore.getAdvancedConfig() + } + await configStore.getPlayoutConfig() await configStore.getUserConfig() await mediaStore.getTree('') @@ -246,8 +249,12 @@ async function deleteChannel() { }) i.value = configStore.i - 1 + + if (authStore.role === 'GlobalAdmin') { + await configStore.getAdvancedConfig() + } + await configStore.getChannelConfig() - await configStore.getAdvancedConfig() await configStore.getPlayoutConfig() await configStore.getUserConfig() await mediaStore.getTree('') diff --git a/frontend/components/HeaderMenu.vue b/frontend/components/HeaderMenu.vue index 641468d6..2588b2b9 100644 --- a/frontend/components/HeaderMenu.vue +++ b/frontend/components/HeaderMenu.vue @@ -181,7 +181,11 @@ function logout() { function selectChannel(index: number) { configStore.i = index - configStore.getAdvancedConfig() + + if (authStore.role === 'GlobalAdmin') { + configStore.getAdvancedConfig() + } + configStore.getPlayoutConfig() } diff --git a/frontend/stores/config.ts b/frontend/stores/config.ts index 2aa925bd..6e751365 100644 --- a/frontend/stores/config.ts +++ b/frontend/stores/config.ts @@ -32,7 +32,7 @@ export const useConfig = defineStore('config', { await this.getPlayoutConfig() await this.getUserConfig() - if (this.configUser.id === 1) { + if (authStore.role === 'GlobalAdmin') { await this.getAdvancedConfig() } })