Closed Bug 705878 Opened 13 years ago Closed 13 years ago

Refactor forgot_password to use different controllers depending on parameters

Categories

(Cloud Services :: Server: Account Portal, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: telliott, Assigned: telliott)

Details

(Whiteboard: [qa+])

Attachments

(1 file)

forgot_password is a pretty monolithic function, involving a bunch of different GETs and POSTs, which means you could conceivably do weird (though not dangerous things) with passing in parameters. Should look into refactoring it now that we have pyramid and can do better routing refinement.
Whiteboard: [qa+]
This one's a little more complex, as it has different templates for each stage and sometimes needs to jump tracks.
Attachment #579358 - Flags: review?(bbangert)
Comment on attachment 579358 [details] [diff] [review] Refactors forgot password, which also required a bit of template changing Review of attachment 579358 [details] [diff] [review]: ----------------------------------------------------------------- ::: accountportal/controllers/console.py @@ +212,5 @@ > + auth = request.registry.settings.get('app.auth') > + username = extract_username(request.params.get('username')) > + request.user['username'] = username > + data['key'] = request.params['key'] > + data['usernm'] = username #needs to be different from the session username Just double checking, this is supposed to be 'usernm' vs. 'username' in data? Is there already a data['username'] key?
Attachment #579358 - Flags: review?(bbangert) → review+
Yes, there is. It's not a typo. That's what the comment is for. data['username'] is automatically populated by the BeforeRender subscriber.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: