Merge lp:~salgado/launchpad/remove-changepassword-page into lp:launchpad/db-devel

Proposed by Guilherme Salgado
Status: Merged
Approved by: Gary Poster
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~salgado/launchpad/remove-changepassword-page
Merge into: lp:launchpad/db-devel
Diff against target: 152 lines (+8/-64)
3 files modified
lib/lp/registry/browser/configure.zcml (+0/-6)
lib/lp/registry/browser/person.py (+5/-58)
lib/lp/registry/interfaces/person.py (+3/-0)
To merge this branch: bzr merge lp:~salgado/launchpad/remove-changepassword-page
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) release-critical Approve
Gary Poster (community) Approve
Review via email: mp+20750@code.launchpad.net

Description of the change

Remove the +changepassword page

Now we're an OpenID consumer, so users should be changing their password
on the OP.

--
Guilherme Salgado <email address hidden>

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

Looks good. Thank you, Salgado.

You have already responded in r9076 to the following request from IRC, which I include here for completeness.

"""
do we have a bug for removing CIP? If not, please create one, and then add the fact that we need to remove IPersonChangePassword to the bug description, and then make a reference to that bug in the XXX in lib/lp/registry/interfaces/person.py, and then add an "improvement" card for removing CIP to the kanban board in the bug grabbag referring to the bug to remove CIP.
"""

Gary

review: Approve
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Land this on production-devel for a regular CP.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/configure.zcml'
2--- lib/lp/registry/browser/configure.zcml 2010-02-19 11:55:02 +0000
3+++ lib/lp/registry/browser/configure.zcml 2010-03-05 14:53:30 +0000
4@@ -790,12 +790,6 @@
5 permission="zope.Public"
6 template="../templates/person-claim.pt"/>
7 <browser:page
8- name="+changepassword"
9- for="lp.registry.interfaces.person.IPerson"
10- class="lp.registry.browser.person.PersonChangePasswordView"
11- permission="launchpad.Edit"
12- template="../../app/templates/generic-edit.pt"/>
13- <browser:page
14 name="+editlanguages"
15 for="lp.registry.interfaces.person.IPerson"
16 class="lp.registry.browser.person.PersonLanguagesView"
17
18=== modified file 'lib/lp/registry/browser/person.py'
19--- lib/lp/registry/browser/person.py 2010-02-25 23:29:29 +0000
20+++ lib/lp/registry/browser/person.py 2010-03-05 14:53:30 +0000
21@@ -20,7 +20,6 @@
22 'PersonAssignedBugTaskSearchListingView',
23 'PersonBrandingView',
24 'PersonBugsMenu',
25- 'PersonChangePasswordView',
26 'PersonClaimView',
27 'PersonCodeOfConductEditView',
28 'PersonCommentedBugTaskSearchListingView',
29@@ -149,7 +148,6 @@
30 from canonical.launchpad.interfaces.gpghandler import (
31 GPGKeyNotFoundError, IGPGHandler)
32 from lp.services.worlddata.interfaces.language import ILanguageSet
33-from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
34 from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
35 from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet
36 from lp.blueprints.interfaces.specification import SpecificationFilter
37@@ -165,9 +163,9 @@
38 from lp.registry.interfaces.mailinglistsubscription import (
39 MailingListAutoSubscribePolicy)
40 from lp.registry.interfaces.person import (
41- INewPerson, IPerson, IPersonChangePassword, IPersonClaim,
42- IPersonSet, ITeam, ITeamReassignment, PersonCreationRationale,
43- PersonVisibility, TeamMembershipRenewalPolicy, TeamSubscriptionPolicy)
44+ INewPerson, IPerson, IPersonClaim, IPersonSet, ITeam, ITeamReassignment,
45+ PersonCreationRationale, PersonVisibility, TeamMembershipRenewalPolicy,
46+ TeamSubscriptionPolicy)
47 from lp.registry.interfaces.poll import IPollSet, IPollSubset
48 from lp.registry.interfaces.ssh import ISSHKeySet, SSHKeyType
49 from lp.registry.interfaces.teammembership import (
50@@ -887,12 +885,6 @@
51 return Link(target, text, icon='edit')
52
53 @enabled_with_permission('launchpad.Edit')
54- def editpassword(self):
55- target = '+changepassword'
56- text = 'Change your password'
57- return Link(target, text, icon='edit')
58-
59- @enabled_with_permission('launchpad.Edit')
60 def edit(self):
61 target = '+edit'
62 text = 'Change details'
63@@ -917,7 +909,7 @@
64 facet = 'overview'
65 links = ['edit', 'branding', 'common_edithomepage',
66 'editemailaddresses', 'editlanguages', 'editwikinames',
67- 'editircnicknames', 'editjabberids', 'editpassword',
68+ 'editircnicknames', 'editjabberids',
69 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships',
70 'codesofconduct', 'karma', 'administer', 'administer_account',
71 'projects', 'activate_ppa', 'maintained',
72@@ -1093,11 +1085,6 @@
73 text = 'OpenPGP Keys'
74 return Link(target, text)
75
76- def passwords(self):
77- target = '+changepassword'
78- text = 'Passwords'
79- return Link(target, text)
80-
81
82 class TeamMenuMixin(PPANavigationMenuMixIn, CommonMenuLinks):
83 """Base class of team menus.
84@@ -3881,45 +3868,6 @@
85 token.sendGPGValidationRequest(key)
86
87
88-class PersonChangePasswordView(LaunchpadFormView):
89-
90- implements(IPersonEditMenu)
91-
92- label = "Change your password"
93- schema = IPersonChangePassword
94- field_names = ['currentpassword', 'password']
95- custom_widget('password', PasswordChangeWidget)
96-
97- @property
98- def next_url(self):
99- return canonical_url(self.context)
100-
101- def validate(self, form_values):
102- current_password = form_values.get('currentpassword')
103- encryptor = getUtility(IPasswordEncryptor)
104- if not encryptor.validate(current_password, self.context.password):
105- self.setFieldError('currentpassword', _(
106- "The provided password doesn't match your current password."))
107- # This is not part of the widget, since the value may
108- # be optional in some forms.
109- new_password = self.request.form.get('field.password', '')
110- if new_password.strip() == '':
111- self.setFieldError('password', _(
112- "Setting an empty password is not allowed."))
113-
114- @action(_("Change Password"), name="submit")
115- def submit_action(self, action, data):
116- password = data['password']
117- self.context.password = password
118- self.request.response.addInfoNotification(_(
119- "Password changed successfully"))
120-
121- @property
122- def cancel_url(self):
123- """The URL that the 'Cancel' link should return to."""
124- return canonical_url(self.context)
125-
126-
127 class BasePersonEditView(LaunchpadEditFormView):
128
129 schema = IPerson
130@@ -5898,8 +5846,7 @@
131 usedfor = IPersonIndexMenu
132 facet = 'overview'
133 title = 'Change person'
134- links = ('edit', 'administer', 'administer_account',
135- 'branding', 'editpassword')
136+ links = ('edit', 'administer', 'administer_account', 'branding')
137
138
139 class ITeamIndexMenu(Interface):
140
141=== modified file 'lib/lp/registry/interfaces/person.py'
142--- lib/lp/registry/interfaces/person.py 2010-02-27 10:19:18 +0000
143+++ lib/lp/registry/interfaces/person.py 2010-03-05 14:53:30 +0000
144@@ -431,6 +431,9 @@
145 super(PersonNameField, self)._validate(input)
146
147
148+# XXX: salgado, 2010/03/05, bug=532688: This is currently used by c-i-p, so it
149+# can't be removed yet. As soon as we stop using c-i-p, though, we'll be able
150+# to remove this.
151 class IPersonChangePassword(Interface):
152 """The schema used by Person +changepassword form."""
153

Subscribers

People subscribed via source and target branches

to status/vote changes: