From e996e9e47f1d0f2c8bd61a3149bc818a5f3a3c21 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 7 Feb 2024 00:10:31 -0600 Subject: [PATCH] Don't allow clone contest with access code --- judge/views/contests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/judge/views/contests.py b/judge/views/contests.py index 64b3d9f..9c054ed 100644 --- a/judge/views/contests.py +++ b/judge/views/contests.py @@ -461,6 +461,8 @@ def is_contest_clonable(request, contest): return False if request.user.has_perm("judge.clone_contest"): return True + if contest.access_code and not contest.is_editable_by(request.user): + return False if contest.ended: return True return False