Added moderation menu

This commit is contained in:
eugenijm 2019-02-18 17:49:32 +03:00
parent ac28e8c2f9
commit 6b6878bde0
22 changed files with 697 additions and 13 deletions

View file

@ -10,7 +10,11 @@ const DeleteButton = {
},
computed: {
currentUser () { return this.$store.state.users.currentUser },
canDelete () { return this.currentUser && this.currentUser.rights.delete_others_notice || this.status.user.id === this.currentUser.id }
canDelete () {
if (!this.currentUser) { return }
const superuser = this.currentUser.rights.moderator || this.currentUser.rights.admin
return superuser || this.status.user.id === this.currentUser.id
}
}
}