Fix:User permissions for collection API routes and UI #951

This commit is contained in:
advplyr 2022-08-31 15:46:10 -05:00
parent e362456895
commit 8ec4bd4279
8 changed files with 70 additions and 50 deletions

View file

@ -20,7 +20,7 @@
</div>
</div>
<div class="absolute bottom-0 left-0 right-0 w-full py-2 px-4 flex">
<ui-btn small color="error" type="button" @click.stop="removeClick">Remove</ui-btn>
<ui-btn v-if="userCanDelete" small color="error" type="button" @click.stop="removeClick">Remove</ui-btn>
<div class="flex-grow" />
<ui-btn color="success" type="submit">Save</ui-btn>
</div>
@ -85,6 +85,9 @@ export default {
},
books() {
return this.collection.books || []
},
userCanDelete() {
return this.$store.getters['user/getUserCanDelete']
}
},
methods: {