移除权限节点,添加 get post route 修饰器

PERM_EDIT_DISCUSSION_REPLY_SELF_DISCUSSION
PERM_EDIT_DISCUSSION_REPLY
PERM_EDIT_PROBLEM_SOLUTION_REPLY
This commit is contained in:
undefined committed 2020-09-25 23:13:35 +08:00
1 parent 6dd7a4dcb8
commit 99b7d33157
8 files changed
+120 -63

No files matched your search

+1 -1
View File
@@ -556,7 +556,7 @@ export class ProblemSolutionHandler extends ProblemDetailHandler {
if ((!psdoc) || psdoc.pid !== this.pdoc.docId) throw new SolutionNotFoundError(psid);
if (!(psrdoc.owner === this.user._id
&& this.user.hasPerm(PERM.PERM_EDIT_PROBLEM_SOLUTION_REPLY_SELF))) {
this.checkPerm(PERM.PERM_EDIT_PROBLEM_SOLUTION_REPLY);
throw new PermissionError(PERM.PERM_EDIT_PROBLEM_SOLUTION_REPLY_SELF);
}
await solution.editReply(domainId, psid, psrid, content);
this.back();