commit: 6c9768b8e2ffb0d1a992689f309020ff3da199d7
parent 0d714f07ecda00a54392f47fe0054e37e269a7d3
Author: Ilja <ilja@ilja.space>
Date: Sat, 6 Aug 2022 14:00:29 +0200
Option to delete a post is shown when privileged with messages_delete
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
@@ -77,8 +77,7 @@ const ExtraButtons = {
currentUser () { return this.$store.state.users.currentUser },
canDelete () {
if (!this.currentUser) { return }
- const superuser = this.currentUser.rights.moderator || this.currentUser.rights.admin
- return superuser || this.status.user.id === this.currentUser.id
+ return this.currentUser.privileges.includes('messages_delete') || this.status.user.id === this.currentUser.id
},
ownStatus () {
return this.status.user.id === this.currentUser.id