load advanced settings only for global admins

This commit is contained in:
Jonathan Baecker 2024-10-24 14:05:15 +02:00
parent fb355e59fc
commit 84e75137b7
3 changed files with 15 additions and 4 deletions

View File

@ -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('')

View File

@ -181,7 +181,11 @@ function logout() {
function selectChannel(index: number) {
configStore.i = index
configStore.getAdvancedConfig()
if (authStore.role === 'GlobalAdmin') {
configStore.getAdvancedConfig()
}
configStore.getPlayoutConfig()
}

View File

@ -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()
}
})