diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index e3ff36fc420c..ea4f0296ab18 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -133,7 +133,7 @@ def _course_team_user(request, course_key, email): # below will never be true. # Remove the .has_user call when course roles are implemented. if (role(course_key).has_user(user) or - course_permission_check(user, course_key, MANAGE_ALL_USERS_PERMISSION)): + course_permission_check(user, MANAGE_ALL_USERS_PERMISSION, course_key)): msg["role"] = role.ROLE break return JsonResponse(msg) @@ -177,7 +177,7 @@ def _course_team_user(request, course_key, email): # below will never return true. # Remove the .has_user() call below when course roles are implemented. elif (role.has_user(user, check_user_activation=False) or - course_permission_check(user, course_key, MANAGE_ALL_USERS_PERMISSION)): # pylint: disable=no-value-for-parameter + course_permission_check(user, MANAGE_ALL_USERS_PERMISSION, course_key)): # pylint: disable=no-value-for-parameter # Remove the user from this old role: old_roles.add(role) diff --git a/common/djangoapps/student/api.py b/common/djangoapps/student/api.py index b866bac2d988..f9b0e39774c5 100644 --- a/common/djangoapps/student/api.py +++ b/common/djangoapps/student/api.py @@ -140,5 +140,5 @@ def is_user_staff_or_instructor_in_course(user, course_key): GlobalStaff().has_user(user) or CourseStaffRole(course_key).has_user(user) or CourseInstructorRole(course_key).has_user(user) or - course_permission_check(user, course_key, MANAGE_STUDENTS_PERMISSION) + course_permission_check(user, MANAGE_STUDENTS_PERMISSION, course_key) )