Check and update login status with all login-related cookies
This commit is contained in:
@@ -175,7 +175,8 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin,
|
||||
MOCK_SETTINGS = {
|
||||
'FEATURES': {
|
||||
'DISABLE_START_DATES': False,
|
||||
'ENABLE_MKTG_SITE': True
|
||||
'ENABLE_MKTG_SITE': True,
|
||||
'DISABLE_SET_JWT_COOKIES_FOR_TESTS': True,
|
||||
},
|
||||
'SOCIAL_SHARING_SETTINGS': {
|
||||
'CUSTOM_COURSE_URLS': True,
|
||||
@@ -186,6 +187,7 @@ class StudentDashboardTests(SharedModuleStoreTestCase, MilestonesTestCaseMixin,
|
||||
MOCK_SETTINGS_HIDE_COURSES = {
|
||||
'FEATURES': {
|
||||
'HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED': True,
|
||||
'DISABLE_SET_JWT_COOKIES_FOR_TESTS': True,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ from openedx.features.enterprise_support.api import get_dashboard_consent_notifi
|
||||
from openedx.features.journals.api import journals_enabled
|
||||
from shoppingcart.api import order_history
|
||||
from shoppingcart.models import CourseRegistrationCode, DonationConfiguration
|
||||
from openedx.core.djangoapps.user_authn.cookies import set_deprecated_user_info_cookie
|
||||
from openedx.core.djangoapps.user_authn.cookies import set_logged_in_cookies
|
||||
from student.helpers import cert_info, check_verify_status_by_course
|
||||
from student.models import (
|
||||
CourseEnrollment,
|
||||
@@ -851,5 +851,5 @@ def student_dashboard(request):
|
||||
})
|
||||
|
||||
response = render_to_response('dashboard.html', context)
|
||||
set_deprecated_user_info_cookie(response, request, user) # pylint: disable=protected-access
|
||||
set_logged_in_cookies(request, response, user)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user