aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIlja <ilja@ilja.space>2022-08-06 14:00:29 +0200
committerIlja <ilja@ilja.space>2022-08-06 14:00:29 +0200
commit6c9768b8e2ffb0d1a992689f309020ff3da199d7 (patch)
treee856188d36f2049d0a3156b28bdc0efe2d32b031 /src
parent0d714f07ecda00a54392f47fe0054e37e269a7d3 (diff)
Option to delete a post is shown when privileged with messages_delete
Diffstat (limited to 'src')
-rw-r--r--src/components/extra_buttons/extra_buttons.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 22ffb65a..345402b7 100644
--- 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