Add view public submissions permission
This commit is contained in:
parent
fdb71ba3c4
commit
eb44b6510a
4 changed files with 26 additions and 0 deletions
|
@ -17,6 +17,12 @@ def submission_layout(
|
|||
if user.has_perm("judge.change_submission"):
|
||||
can_view = True
|
||||
|
||||
if user.has_perm("judge.view_all_submission"):
|
||||
can_view = True
|
||||
|
||||
if user.has_perm("judge.view_public_submission"):
|
||||
can_view = True
|
||||
|
||||
if submission.problem_id in completed_problem_ids:
|
||||
can_view |= (
|
||||
submission.problem.is_public or profile_id in submission.problem.tester_ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue