mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
移除权限节点,添加 get post route 修饰器
PERM_EDIT_DISCUSSION_REPLY_SELF_DISCUSSION PERM_EDIT_DISCUSSION_REPLY PERM_EDIT_PROBLEM_SOLUTION_REPLY
This commit is contained in:
1 parent
6dd7a4dcb8
commit
99b7d33157
8 files changed
+120
-63
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user