mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: add maintainer field for doc (#101)
This commit is contained in:
1 parent
7bde6a922c
commit
da32c79f21
24 files changed
+85
-74
No files matched your search
@@ -34,10 +34,10 @@ export class ProblemSendHandler extends Handler {
|
||||
const pids = new Set<number>();
|
||||
for (const key in pdocs) {
|
||||
pids.add(pdocs[key].docId);
|
||||
if (pdocs[key].hidden && !getHidden && pdocs[key].owner !== this.user._id) {
|
||||
if (pdocs[key].hidden && !getHidden && !this.user.own(pdocs[key])) {
|
||||
throw new PermissionError(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
}
|
||||
if (!getData && pdocs[key].owner !== this.user._id) {
|
||||
if (!getData && !this.user.own(pdocs[key])) {
|
||||
throw new PermissionError(PERM.PERM_READ_PROBLEM_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user