From 6a8491537ce170211d08bd263c4cfaef4099f698 Mon Sep 17 00:00:00 2001 From: panda Date: Wed, 19 Jul 2023 13:02:42 +0800 Subject: [PATCH] core: fix user delete self discussion reply (#615) (#617) --- packages/hydrooj/src/handler/discussion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hydrooj/src/handler/discussion.ts b/packages/hydrooj/src/handler/discussion.ts index ce8fa1e8..ad140c8a 100644 --- a/packages/hydrooj/src/handler/discussion.ts +++ b/packages/hydrooj/src/handler/discussion.ts @@ -284,7 +284,7 @@ class DiscussionDetailHandler extends DiscussionHandler { && this.user.hasPerm(PERM.PERM_DELETE_DISCUSSION_REPLY_SELF_DISCUSSION))) { if (!this.user.own(this.drdoc)) { this.checkPerm(PERM.PERM_DELETE_DISCUSSION_REPLY); - } else this.checkPerm(PERM.PERM_DELETE_DISCUSSION_SELF); + } else this.checkPerm(PERM.PERM_DELETE_DISCUSSION_REPLY_SELF); } const msg = JSON.stringify({ message: '{0} {1} delete your discussion reply {2} in "{3}"({4:link}).',