From c24e44a8f22be1620b103b75ebd255cd610e143e Mon Sep 17 00:00:00 2001 From: Jiayi Zheng Date: Thu, 8 Dec 2016 20:26:05 +0100 Subject: [PATCH] Fixes user right check --- src/components/delete_button/delete_button.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/delete_button/delete_button.js b/src/components/delete_button/delete_button.js index 5f824899..990c32ad 100644 --- a/src/components/delete_button/delete_button.js +++ b/src/components/delete_button/delete_button.js @@ -9,7 +9,8 @@ const DeleteButton = { } }, computed: { - canDelete () { return this.status.user.rights.delete_others_notice || this.status.user.id == this.$store.state.users.currentUser.id } + currentUser () { return this.$store.state.users.currentUser }, + canDelete () { return this.currentUser.delete_others_notice || this.status.user.id == this.currentUser.id } } }