Commit 3b42f70b by ichuang

add feature flag to disable login button (for systems which autologin)

parent 289f8110
......@@ -55,6 +55,8 @@ MITX_FEATURES = {
'ENABLE_SQL_TRACKING_LOGS': False,
'ENABLE_LMS_MIGRATION': False,
'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL
# extrernal access methods
'ACCESS_REQUIRE_STAFF_FOR_COURSE': False,
'AUTH_USE_OPENID': False,
......
......@@ -10,12 +10,17 @@ sessions. Assumes structure:
from .common import *
from .logsettings import get_logger_config
from .dev import *
import socket
WIKI_ENABLED = False
MITX_FEATURES['ENABLE_TEXTBOOK'] = False
MITX_FEATURES['ENABLE_DISCUSSION'] = False
MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = True # require that user be in the staff_* group to be able to enroll
myhost = socket.gethostname()
if ('edxvm' in myhost) or ('ocw' in myhost):
MITX_FEATURES['DISABLE_LOGIN_BUTTON'] = True # auto-login with MIT certificate
#-----------------------------------------------------------------------------
# disable django debug toolbars
......
......@@ -42,11 +42,15 @@
<a href="${reverse('about_edx')}">About</a>
<a href="http://edxonline.tumblr.com/">Blog</a>
<a href="${reverse('jobs')}">Jobs</a>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
<a href="#login-modal" id="login" rel="leanModal">Log In</a>
% endif
</li>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
<li class="primary">
<a href="#signup-modal" id="signup" rel="leanModal">Sign Up</a>
</li>
% endif
</ol>
</nav>
%endif
......
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