Merge lp:~maxiberta/canonical-identity-provider/remove-reset-pwd-confirm-code into lp:canonical-identity-provider/release

Proposed by Maximiliano Bertacchini
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: no longer in the source branch.
Merged at revision: 1431
Proposed branch: lp:~maxiberta/canonical-identity-provider/remove-reset-pwd-confirm-code
Merge into: lp:canonical-identity-provider/release
Diff against target: 66 lines (+3/-11)
3 files modified
src/identityprovider/templates/email/forgottenpassword.txt (+1/-5)
src/webui/tests/test_views_registration.py (+0/-2)
src/webui/views/registration.py (+2/-4)
To merge this branch: bzr merge lp:~maxiberta/canonical-identity-provider/remove-reset-pwd-confirm-code
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Daniel Manrique (community) Approve
Review via email: mp+292996@code.launchpad.net

Commit message

Remove references to unused token in password reset views (fixes #1568299).

Description of the change

Remove references to unused token in password reset views (fixes #1568299).

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks OK to me, I wonder if we should more thoroughly test that the string is gone, but that'd be just a test artifact of us knowing it was there *before*, so I think this is ok.

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good. Would you please confirm that grepping to "confirmation code" does not show any other code that needs updating?

Thanks!

review: Approve
Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

All appearances of "confirmation code" (case insensitive) seem to be in error messages, which don't need updating in my opinion.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/identityprovider/templates/email/forgottenpassword.txt'
2--- src/identityprovider/templates/email/forgottenpassword.txt 2014-12-09 21:32:43 +0000
3+++ src/identityprovider/templates/email/forgottenpassword.txt 2016-04-26 18:09:58 +0000
4@@ -2,11 +2,7 @@
5
6 You have requested a new password for your Ubuntu One account.
7
8-Here is your confirmation code:{% endblocktrans %}
9-
10-{{ token }}
11-
12-{% blocktrans %}Enter this code into the password-reset form, or click the following link to automatically confirm your reset:{% endblocktrans %}
13+Click the following link to automatically confirm your reset:{% endblocktrans %}
14
15 {{ token_url }}
16
17
18=== modified file 'src/webui/tests/test_views_registration.py'
19--- src/webui/tests/test_views_registration.py 2016-03-08 20:20:58 +0000
20+++ src/webui/tests/test_views_registration.py 2016-04-26 18:09:58 +0000
21@@ -370,7 +370,6 @@
22 ctx = response.context_data
23 self.assertEqual(ctx['form']['email'].value(), None)
24 self.assertEqual(ctx['rpconfig'], None)
25- self.assertEqual(ctx['token'], None)
26 self.assert_form_displayed(response)
27 self.assert_stat_calls(['requested'])
28
29@@ -395,7 +394,6 @@
30 token = '12345678' * 2
31 response = self.post(token=token, data=dict(email="111"))
32
33- self.assertEqual(response.context_data['token'], token)
34 self.assert_form_displayed(response)
35 self.assert_stat_calls(['error.form'])
36
37
38=== modified file 'src/webui/views/registration.py'
39--- src/webui/views/registration.py 2016-03-08 20:20:58 +0000
40+++ src/webui/views/registration.py 2016-04-26 18:09:58 +0000
41@@ -259,8 +259,7 @@
42 heading = 'Reset password'
43 reason = _(
44 'We have sent an email to %(email_to)s. To continue, '
45- 'click on the link in your email, or enter the '
46- 'confirmation code below.') % msgs
47+ 'click on the link in your email.') % msgs
48
49 return display_email_sent(
50 request,
51@@ -269,7 +268,6 @@
52 reason,
53 _("Check that you’ve actually "
54 "entered a subscribed email address."),
55- token=token,
56 rpconfig=rpconfig,
57 )
58
59@@ -282,7 +280,7 @@
60 return HttpResponseNotAllowed(['GET', 'POST'])
61
62 context = RequestContext(
63- request, dict(form=form, rpconfig=rpconfig, token=token))
64+ request, dict(form=form, rpconfig=rpconfig))
65 template = 'registration/forgot_password.html'
66 return TemplateResponse(request, template, context)
67