From 74f689fefb77328f22772bbdf9ebc6aefb01cdab Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 27 Sep 2022 17:24:36 +0200 Subject: Show buttons for modele edit/delete to staffers --- pages/models/_id/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pages/models') diff --git a/pages/models/_id/index.vue b/pages/models/_id/index.vue index d242161..c06fa15 100644 --- a/pages/models/_id/index.vue +++ b/pages/models/_id/index.vue @@ -96,7 +96,7 @@ | Report a.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-gray-600.py-2.px-4.mr-2.text-sm.font-medium.text-white.shadow-sm( class="hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2" - :href="'/models/'+model.id+'/edit'" v-if="me && me.id == model.author_id" + :href="'/models/'+model.id+'/edit'" v-if="me && (me.is_staff || me.id == model.author_id)" ) @@ -104,7 +104,7 @@ | Edit button.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-red-600.py-2.px-4.text-sm.font-medium.text-white.shadow-sm( class="hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2" - @click="boxDeleteModel = !boxDeleteModel" v-if="me && me.id == model.author_id" + @click="boxDeleteModel = !boxDeleteModel" v-if="me && (me.is_staff || me.id == model.author_id)" ) -- cgit v1.2.3-18-g5258