Commit 616d18e1 by Brian Wilson

Post-rebasing fixes to re-enable masquerading.

parent 1984cfec
...@@ -183,6 +183,10 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours ...@@ -183,6 +183,10 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
See get_module() docstring for further details. See get_module() docstring for further details.
""" """
# allow course staff to masquerade as student
if has_access(user, descriptor, 'staff', course_id):
setup_masquerade(request, True)
track_function = make_track_function(request) track_function = make_track_function(request)
xqueue_callback_url_prefix = get_xqueue_callback_url_prefix(request) xqueue_callback_url_prefix = get_xqueue_callback_url_prefix(request)
...@@ -202,10 +206,6 @@ def get_module_for_descriptor_internal(user, descriptor, model_data_cache, cours ...@@ -202,10 +206,6 @@ def get_module_for_descriptor_internal(user, descriptor, model_data_cache, cours
See get_module() docstring for further details. See get_module() docstring for further details.
""" """
# allow course staff to masquerade as student
if has_access(user, descriptor, 'staff', course_id):
setup_masquerade(request, True)
# Short circuit--if the user shouldn't have access, bail without doing any work # Short circuit--if the user shouldn't have access, bail without doing any work
if not has_access(user, descriptor, 'load', course_id): if not has_access(user, descriptor, 'load', course_id):
return None return None
......
...@@ -58,7 +58,7 @@ urlpatterns = ('', # nopep8 ...@@ -58,7 +58,7 @@ urlpatterns = ('', # nopep8
name='auth_password_reset_done'), name='auth_password_reset_done'),
url(r'^heartbeat$', include('heartbeat.urls')), url(r'^heartbeat$', include('heartbeat.urls')),
url(r'^course_task_log_status/$', 'courseware.tasks.course_task_log_status', name='course_task_log_status'), url(r'^course_task_log_status/$', 'courseware.task_queue.course_task_log_status', name='course_task_log_status'),
) )
# University profiles only make sense in the default edX context # University profiles only make sense in the default edX context
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment