Client - display Admin 'link' only if authenticated user is admin

This commit is contained in:
Sam 2021-10-05 18:06:46 +02:00
parent 95cf71055b
commit 1ebced48c4

View File

@ -29,7 +29,9 @@
<router-link class="nav-item" to="/statistics"> <router-link class="nav-item" to="/statistics">
{{ t('statistics.STATISTICS') }} {{ t('statistics.STATISTICS') }}
</router-link> </router-link>
<div class="nav-item">{{ t('administration.ADMIN') }}</div> <div v-if="isAuthenticated && authUser.admin" class="nav-item">
{{ t('administration.ADMIN') }}
</div>
<router-link class="nav-item" to="/workouts/add"> <router-link class="nav-item" to="/workouts/add">
{{ t('workouts.ADD_WORKOUT') }} {{ t('workouts.ADD_WORKOUT') }}
</router-link> </router-link>