Previously, the function also checked for the contests.contest_admin permission. The TeacherAuthBackend was invalid, because it only checked for contests.contest_admin permission and not for the contests.contest_basicadmin permission, which is a subset of contest_admin permission. This resulted in teachers not being able to see their contests
The PR that introduced Contest owner permission (#257) changed the
can_admin_contest
function to this: https://github.com/sio2project/oioioi/blob/288ecffffd14d83020d9b3a7e541f356b2087a66/oioioi/contests/utils.py#L458-L460Previously, the function also checked for the
contests.contest_admin
permission. TheTeacherAuthBackend
was invalid, because it only checked forcontests.contest_admin
permission and not for thecontests.contest_basicadmin
permission, which is a subset ofcontest_admin
permission. This resulted in teachers not being able to see their contests