Don't use zulipdev.com when subdomain support is disabled.

This commit is contained in:
hackerkid
2016-10-23 04:02:32 +05:30
committed by Tim Abbott
parent 54016e1096
commit b5816bf99e
4 changed files with 7 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ def login_or_register_remote_user(request, remote_username, user_profile, full_n
return maybe_send_to_registration(request, remote_user_to_email(remote_username), full_name)
else:
login(request, user_profile)
if settings.OPEN_REALM_CREATION and user_profile.realm.subdomain is not None:
if settings.REALMS_HAVE_SUBDOMAINS and user_profile.realm.subdomain is not None:
return HttpResponseRedirect("%s%s.%s" % (settings.EXTERNAL_URI_SCHEME,
user_profile.realm.subdomain,
settings.EXTERNAL_HOST))
@@ -287,7 +287,7 @@ def dev_direct_login(request, **kwargs):
if user_profile is None:
raise Exception("User cannot login")
login(request, user_profile)
if settings.OPEN_REALM_CREATION and settings.DEVELOPMENT:
if settings.REALMS_HAVE_SUBDOMAINS and settings.DEVELOPMENT:
if user_profile.realm.subdomain is not None:
return HttpResponseRedirect("%s%s.%s" % (settings.EXTERNAL_URI_SCHEME,
user_profile.realm.subdomain,