Skip to content

Commit

Permalink
CHG skip course context check when superuser
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Feb 14, 2022
1 parent e7376f0 commit 8e948b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/anubis/lms/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ def assert_course_context(*models: Tuple[Any]):
:return:
"""

# If the current user is a superuser, then we can skip
# any and all course context checks.
if current_user.is_superuser:
return True

# Get the current course context
context = get_course_context()

Expand Down

0 comments on commit 8e948b5

Please sign in to comment.