From 8e948b5345f6c951d00707fbe71068928bd22ee7 Mon Sep 17 00:00:00 2001 From: John McCann Cunniff Jr Date: Sun, 13 Feb 2022 20:36:44 -0500 Subject: [PATCH] CHG skip course context check when superuser --- api/anubis/lms/courses.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/anubis/lms/courses.py b/api/anubis/lms/courses.py index 81b3d844d..dca8fc8b7 100644 --- a/api/anubis/lms/courses.py +++ b/api/anubis/lms/courses.py @@ -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()