Skip to content

Commit 8e948b5

Browse files
committed
CHG skip course context check when superuser
1 parent e7376f0 commit 8e948b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/anubis/lms/courses.py

+5
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ def assert_course_context(*models: Tuple[Any]):
235235
:return:
236236
"""
237237

238+
# If the current user is a superuser, then we can skip
239+
# any and all course context checks.
240+
if current_user.is_superuser:
241+
return True
242+
238243
# Get the current course context
239244
context = get_course_context()
240245

0 commit comments

Comments
 (0)