Commit 5f74ccd1 by ichuang

use ENABLE_MASQUERADE in masquerade.py

parent 5ca0393e
......@@ -8,6 +8,7 @@ import json
import logging
from django.http import HttpResponse
from django.conf import settings
log = logging.getLogger(__name__)
......@@ -39,6 +40,9 @@ def setup_masquerade(request, staff_access=False):
if request.user is None:
return None
if not settings.MITX_FEATURES.get('ENABLE_MASQUERADE', False):
return None
if not staff_access: # can masquerade only if user has staff access to course
return None
......
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