Don't allow clone contest with access code

This commit is contained in:
cuom1999 2024-02-07 00:10:31 -06:00
parent d9b477c441
commit e996e9e47f

View file

@ -461,6 +461,8 @@ def is_contest_clonable(request, contest):
return False return False
if request.user.has_perm("judge.clone_contest"): if request.user.has_perm("judge.clone_contest"):
return True return True
if contest.access_code and not contest.is_editable_by(request.user):
return False
if contest.ended: if contest.ended:
return True return True
return False return False