添加contest ip限制api;

OI problem的AC,total count也算入profile了
This commit is contained in:
zema1
2017-11-10 19:40:54 +08:00
parent 48f65d1a14
commit 727fbf48d8
13 changed files with 96 additions and 21 deletions

View File

@@ -82,7 +82,7 @@ def check_contest_permission(check_type="details"):
return self.error("Contest %s doesn't exist" % contest_id)
# creator or owner
if self.contest.is_contest_admin(user):
if user.is_authenticated() and user.is_contest_admin(self.contest):
return func(*args, **kwargs)
if self.contest.contest_type == ContestType.PASSWORD_PROTECTED_CONTEST: