From f3ce28c1f79ca5cff1a8f6c0d63776d451cb7ca9 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 6 Nov 2022 15:00:59 +0800 Subject: [PATCH] fix(web/submission_list): sql for view permission --- web/app/libs/uoj-html-lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/libs/uoj-html-lib.php b/web/app/libs/uoj-html-lib.php index 774c364..29da793 100644 --- a/web/app/libs/uoj-html-lib.php +++ b/web/app/libs/uoj-html-lib.php @@ -392,13 +392,13 @@ function echoSubmissionsList($cond, $tail, $config, $user) { if (!isProblemManager($user)) { if ($user != null) { $permission_cond = DB::lor([ - "submissions.is_hidden" => "false", + "submissions.is_hidden" => false, "submissions.submitter" => $user['username'], DB::land([ "submissions.is_hidden" => true, DB::lor([ "submissions.problem_id in (select problem_id from problems_permissions where username = '{$user['username']}')", - "submissions.problem_id in (select id from problems where uploader = '{$user['username']}'))", + "submissions.problem_id in (select id from problems where uploader = '{$user['username']}')", ]), ]), ]);