Change HOME_NOT_LOGGED_IN if SSO is the only auth enabled.

(imported from commit a6b41a83d53ac1a87547f005c26ea970fe7508f6)
This commit is contained in:
Tim Abbott
2013-11-13 11:21:41 -05:00
parent 2fff9f94ab
commit 7d61a57822

View File

@@ -166,7 +166,6 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
AUTHENTICATION_BACKENDS += ('guardian.backends.ObjectPermissionBackend',)
ANONYMOUS_USER_ID = None
AUTH_USER_MODEL = "zerver.UserProfile"
@@ -708,7 +707,13 @@ POLL_TIMEOUT = 90 * 1000
# client tests.
TUTORIAL_ENABLED = True
HOME_NOT_LOGGED_IN = '/login'
if (len(AUTHENTICATION_BACKENDS) == 1 and
AUTHENTICATION_BACKENDS[0] == "zproject.backends.ZulipRemoteUserBackend"):
HOME_NOT_LOGGED_IN = "/accounts/login/sso"
else:
HOME_NOT_LOGGED_IN = '/login'
AUTHENTICATION_BACKENDS += ('guardian.backends.ObjectPermissionBackend',)
if DEPLOYED:
FULL_NAVBAR = False
else: