From 755a6a8547796718c38fe38eebf5f83bd252483f Mon Sep 17 00:00:00 2001 From: Menci Date: Wed, 14 Dec 2016 18:41:47 +0800 Subject: [PATCH] Disallow users to see non-public problem's judge state --- models/judge_state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/judge_state.js b/models/judge_state.js index 58c41a3..c8efa35 100644 --- a/models/judge_state.js +++ b/models/judge_state.js @@ -122,7 +122,7 @@ class JudgeState extends Model { await this.loadRelationships(); if (user && (user.is_admin || user.id === this.problem.user_id)) return true; - else if (this.type === 0) return this.problem.public; + else if (this.type === 0) return this.problem.is_public; else if (this.type === 1) { let contest = await Contest.fromID(this.type_info); if (await contest.isRunning()) {