core&ui: fix bugs and add hint (#635)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
panda authored and GitHub committed 2023-08-27 01:58:32 +08:00
1 parent e02d8b5d43
commit 7687b99f07
13 files changed
+81 -49

No files matched your search

+4 -1
View File
@@ -322,7 +322,10 @@ class DiscussionDetailHandler extends DiscussionHandler {
@param('drrid', Types.ObjectId)
async postDeleteTailReply(domainId: string, drid: ObjectId, drrid: ObjectId) {
const deleteBy = this.user.own(this.drrdoc) ? 'self' : 'Admin';
if (!this.user.own(this.drrdoc)) this.checkPerm(PERM.PERM_DELETE_DISCUSSION_REPLY);
if (!(this.user.own(this.drrdoc)
&& this.user.hasPerm(PERM.PERM_DELETE_DISCUSSION_REPLY_SELF))) {
this.checkPerm(PERM.PERM_DELETE_DISCUSSION_REPLY);
}
const msg = JSON.stringify({
message: 'Admin {0} delete your discussion tail reply {1} in "{2}"({3:link}).',
params: [