Skip to content
Snippets Groups Projects
Commit 124cf987 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix: remove remaining uses of isSuperuser flag

The dashboard should generally only check for permissions not flags.
parent 7fc88404
No related branches found
No related tags found
No related merge requests found
Pipeline #7418 passed
<template>
<template v-if="authStore.isSuperuser">
<AddShowModal ref="addShowModal" v-bind="attrs" />
<AddShowModal ref="addShowModal" v-bind="attrs" />
<button
type="button"
:data-testid="testId"
class="btn btn-default md:tw-whitespace-nowrap"
@click="addShowModal.open()"
>
{{ t('showCreator.title') }}
</button>
</template>
<button
type="button"
:data-testid="testId"
class="btn btn-default md:tw-whitespace-nowrap"
@click="addShowModal.open()"
>
{{ t('showCreator.title') }}
</button>
</template>
<script lang="ts" setup>
......@@ -18,7 +16,6 @@ import { ref, useAttrs } from 'vue'
import AddShowModal from './AddShowModal.vue'
import { useI18n } from '@/i18n'
import { useAuthStore } from '@/stores/auth'
defineOptions({
inheritAttrs: false,
......@@ -29,7 +26,6 @@ defineProps<{
}>()
const attrs = useAttrs()
const authStore = useAuthStore()
const { t } = useI18n()
const addShowModal = ref()
......
......@@ -121,7 +121,6 @@ export const useAuthStore = defineStore('auth', () => {
const currentUser = ref<CurrentUser>()
const _steeringUser = ref<SteeringUser>()
const steeringUser = computed(() => (currentUser.value ? _steeringUser.value : undefined))
const isSuperuser = computed(() => steeringUser.value?.isSuperuser === true)
const sessionInitializationState = ref<SessionInitializationState>()
const isInitializingSession = computed(() => sessionInitializationState.value !== undefined)
......@@ -202,7 +201,6 @@ export const useAuthStore = defineStore('auth', () => {
return {
currentUser: shallowReadonly(currentUser),
steeringUser,
isSuperuser,
sessionInitializationState: readonly(sessionInitializationState),
isInitializingSession: readonly(isInitializingSession),
init,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment