AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and celebration APIs in course_home_api / courseware_api. - Consolidates and cleans up places we check whether masquerading gives us full access to a course.
This commit is contained in:
@@ -96,7 +96,7 @@ class CourseEnrollmentSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
Returns expiration date for a course audit expiration, if any or null
|
||||
"""
|
||||
if not CourseDurationLimitConfig.enabled_for_enrollment(user=model.user, course_key=model.course.id):
|
||||
if not CourseDurationLimitConfig.enabled_for_enrollment(model.user, model.course):
|
||||
return None
|
||||
|
||||
return get_user_course_expiration_date(model.user, model.course)
|
||||
|
||||
@@ -290,7 +290,8 @@ class TestUserEnrollmentApi(UrlResetMixin, MobileAPITestCase, MobileAuthUserTest
|
||||
course = CourseFactory.create(start=self.LAST_WEEK, mobile_available=True)
|
||||
self.enroll(course.id)
|
||||
|
||||
add_course_mode(course, upgrade_deadline_expired=False)
|
||||
add_course_mode(course, mode_slug=CourseMode.AUDIT)
|
||||
add_course_mode(course)
|
||||
|
||||
def _get_enrollment_data(self, api_version, expired):
|
||||
self.login()
|
||||
|
||||
Reference in New Issue
Block a user