forked from zulip/zulip
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change-email: Implement confirmation flow.
Fixes zulip#734.
- Loading branch information
1 parent
8ac4fe1
commit 0775e9c
Showing
18 changed files
with
458 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.4 on 2017-01-17 09:16 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('confirmation', '0002_realmcreationkey'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='EmailChangeConfirmation', | ||
fields=[ | ||
], | ||
options={ | ||
'proxy': True, | ||
}, | ||
bases=('confirmation.confirmation',), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends "zerver/portico.html" %} | ||
|
||
{% block portico_content %} | ||
|
||
<div class="pitch"> | ||
<hr/> | ||
{% if confirmed %} | ||
<p>Your new email address is confirmed.</p> | ||
{% else %} | ||
|
||
<p class="lead">Whoops, something's not right. We couldn't find your confirmation ID!</p> | ||
|
||
{% if verbose_support_offers %} | ||
<p>Make sure you copied the link correctly in to your browser. If you're | ||
still encountering this page, its probably our fault. We're sorry.</p> | ||
|
||
<p>Anyway, shoot us a line at | ||
<a href="mailto:{{ support_email }}">{{ support_email }}</a> | ||
and we'll get this resolved shortly. | ||
</p> | ||
{% else %} | ||
<p>Make sure you copied the link correctly in to your browser.</p> | ||
|
||
<p>If you're still having problems, please contact your Zulip administrator at | ||
<a href="mailto:{{ support_email }}">{{ support_email }}</a>. | ||
</p> | ||
{% endif %} | ||
|
||
{% endif %} | ||
</div> | ||
|
||
{% endblock %} |
38 changes: 38 additions & 0 deletions
38
templates/confirmation/emailchangestatus_confirmation_email.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>Zulip</title> | ||
</head> | ||
<body> | ||
<table width="80%" style="align:center; max-width:800px" align="center"> | ||
<tr> | ||
<td style="font-size:16px; font-family:Helvetica;"> | ||
<p>Hi! | ||
</p> | ||
|
||
<p>Our records show that you requested a change to the email address | ||
you use to sign in to Zulip. Please click the link below to activate | ||
your new address. | ||
<br /> | ||
<a href="{{ activate_url }}" style="color:#08c">{{ activate_url }}</a> | ||
</p> | ||
|
||
<p> | ||
{% if verbose_support_offers %} | ||
Feel free to give us a shout at <a href="mailto:{{ support_email }}" style="color:#08c">{{ support_email }}</a>, if you have any questions. | ||
{% else %} | ||
If you did not request this change, please contact your Zulip | ||
administrator at <a href="mailto:{{ support_email }}" style="color:#08c">{{ support_email }}</a>. | ||
{% endif %} | ||
</p> | ||
|
||
<p> | ||
Cheers,<br /> | ||
The Zulip Team | ||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
1 change: 1 addition & 0 deletions
1
templates/confirmation/emailchangestatus_confirmation_email.subject
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Zulip] Confirm your new email address for {{ realm.name }} |
17 changes: 17 additions & 0 deletions
17
templates/confirmation/emailchangestatus_confirmation_email.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Hi! | ||
|
||
Our records show that you requested a change to the email address you use to sign in to Zulip. | ||
Please click the link below to activate your new address. | ||
|
||
{{ activate_url }} | ||
|
||
|
||
{% if verbose_support_offers %} | ||
Feel free to give us a shout at <{{ support_email }}> if you have any questions. | ||
{% else %} | ||
If you did not request this change, please contact your Zulip administrator at <{{ support_email }}>. | ||
{% endif %} | ||
|
||
Cheers, | ||
|
||
The Zulip Team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Hi, | ||
|
||
We just wanted to let you know that the email associated with your Zulip account | ||
was recently changed to {{ new_email }}. If you did not request this change, | ||
please contact us immediately at <{{ support_email }}>. | ||
|
||
Best, | ||
|
||
The Zulip Team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Zulip] Email address changed for {{ realm.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.4 on 2017-01-17 09:18 | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('zerver', '0052_auto_fix_realmalias_realm_nullable'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='EmailChangeStatus', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('new_email', models.EmailField(max_length=254)), | ||
('old_email', models.EmailField(max_length=254)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('status', models.IntegerField(default=0)), | ||
('realm', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='zerver.Realm')), | ||
('user_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.