emails: Remove confirmation_registration_mit.

Not enough new Zephyr signups to justify the carrying cost :(.
This commit is contained in:
Rishi Gupta 2017-06-10 12:34:57 -07:00 committed by Tim Abbott
parent 215568aae2
commit 3332ebaf22
6 changed files with 3 additions and 63 deletions

View File

@ -1 +0,0 @@
Activate your Zulip account

View File

@ -1,21 +0,0 @@
Hello,
Thanks for giving Zulip a try!
There are a few steps you need to take to ensure Zulip works with your
MIT Zephyr account.
1) Create a password and activate your account:
<{{ activate_url }}>
2) Follow the instructions on <https://zephyr.zulipchat.com/zephyr> to setup
the Zephyr mirroring system.
Feel free to send us a message via the Feedback button under the gear
tab within the app if you have any questions or encounter any
problems.
Cheers,
All of us here at Zulip

View File

@ -1509,32 +1509,6 @@ class UserSignUpTest(ZulipTestCase):
mock_ldap.reset()
mock_initialize.stop()
@patch('DNS.dnslookup', return_value=[['sipbtest:*:20922:101:Fred Sipb,,,:/mit/sipbtest:/bin/athena/tcsh']])
def test_registration_email_for_mirror_dummy_user(self, ignored):
# type: (Any) -> None
user_profile = self.mit_user("sipbtest")
email = user_profile.email
user_profile.is_mirror_dummy = True
user_profile.is_active = False
user_profile.save()
with self.settings(REALMS_HAVE_SUBDOMAINS=True):
with patch('zerver.forms.get_subdomain', return_value='zephyr'):
with patch('zerver.views.registration.get_subdomain', return_value='zephyr'):
result = self.client_post('/accounts/home/', {'email': email})
self.assertEqual(result.status_code, 302)
from django.core.mail import outbox
for message in reversed(outbox):
if email in message.to:
# The main difference between the zephyr registation email
# and the normal one is this string
index = message.body.find('https://zephyr.zulipchat.com/zephyr')
if index >= 0:
return
else:
raise AssertionError("Couldn't find the right confirmation email.")
@patch('DNS.dnslookup', return_value=[['sipbtest:*:20922:101:Fred Sipb,,,:/mit/sipbtest:/bin/athena/tcsh']])
def test_registration_of_mirror_dummy_user(self, ignored):
# type: (Any) -> None

View File

@ -86,8 +86,6 @@ class TemplateTestCase(ZulipTestCase):
'zerver/delete_message.html',
]
unusual = [
'zerver/emails/confirm_registration_mit.txt',
'zerver/emails/confirm_registration_mit.subject',
'zerver/emails/invitation_mit.txt',
'zerver/emails/invitation_mit.subject',
'zerver/emails/confirm_new_email.subject',

View File

@ -297,19 +297,9 @@ def send_registration_completion_email(email, request, realm_creation=False):
Send an email with a confirmation link to the provided e-mail so the user
can complete their registration.
"""
template_prefix = 'zerver/emails/confirm_registration'
# Note: to make the following work in the non-subdomains case, you'll
# need to copy the logic from the beginning of accounts_register to
# figure out which realm the user is trying to sign up for, and then
# check if it is a zephyr mirror realm.
if settings.REALMS_HAVE_SUBDOMAINS:
realm = get_realm(get_subdomain(request))
if realm and realm.is_zephyr_mirror_realm:
template_prefix = 'zerver/emails/confirm_registration_mit'
prereg_user = create_preregistration_user(email, request, realm_creation)
return Confirmation.objects.send_confirmation(prereg_user, template_prefix, email,
host=request.get_host())
return Confirmation.objects.send_confirmation(
prereg_user, 'zerver/emails/confirm_registration', email, host=request.get_host())
def redirect_to_email_login_url(email):
# type: (str) -> HttpResponseRedirect

View File

@ -57,7 +57,7 @@ def email_page(request):
}
templates = [
'confirm_registration', 'invitation', 'invitation_reminder', 'confirm_registration_mit',
'confirm_registration', 'invitation', 'invitation_reminder',
'invitation_mit', 'followup_day1', 'followup_day2', 'missed_message', 'digest', 'find_team',
'password_reset', 'confirm_new_email', 'notify_change_in_email', 'notify_new_login']