完善OI细则

This commit is contained in:
zema1
2017-10-16 09:45:29 +08:00
parent 2c5a1e42bf
commit f5566148bc
8 changed files with 44 additions and 37 deletions

View File

@@ -92,7 +92,8 @@ def check_contest_permission(func):
if not user.is_authenticated():
return self.error("Please login in first.")
# password error
if ("contests" not in request.session) or (self.contest.id not in request.session["contests"]):
if ("accessible_contests" not in request.session) or \
(self.contest.id not in request.session["accessible_contests"]):
return self.error("Password is required.")
return func(*args, **kwargs)