Browse Source

Fix judge state permission in contest.

master
t123yh 7 years ago
parent
commit
d3691e3b0c
  1. 2
      models/judge_state.js

2
models/judge_state.js

@ -125,7 +125,7 @@ class JudgeState extends Model {
else if (this.type === 1) {
let contest = await Contest.fromID(this.type_info);
if (contest.isRunning()) {
return (user && this.user_id === user.id) || (user && user.is_admin);
return user && await contest.isSupervisior(user);
} else {
return true;
}

Loading…
Cancel
Save