Merge lp://staging/~nataliabidart/ubuntu-sso-client/add-password-reset into lp://staging/ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 562
Merge reported by: dobey
Merged at revision: not available
Proposed branch: lp://staging/~nataliabidart/ubuntu-sso-client/add-password-reset
Merge into: lp://staging/ubuntu-sso-client
Diff against target: 2285 lines (+1056/-596)
6 files modified
bin/ubuntu-sso-login-gui (+5/-4)
data/ui.glade (+501/-375)
ubuntu_sso/gui.py (+297/-120)
ubuntu_sso/main.py (+17/-12)
ubuntu_sso/tests/test_gui.py (+221/-69)
ubuntu_sso/tests/test_main.py (+15/-16)
To merge this branch: bzr merge lp://staging/~nataliabidart/ubuntu-sso-client/add-password-reset
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
John Lenton (community) Approve
Rodrigo Moya Pending
Review via email: mp+31392@code.staging.launchpad.net

Commit message

Added the password reset functionality.

Description of the change

Added the password reset functionality. To execute, please run:

PYTHONPATH=. ./bin/ubuntu-sso-login-gui --login

To run the tests:

./run-tests

The diff below is huge but mainly because I refactored most of the code to be able to switch to assistance very easily.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

The window's title doesn't support markup :)
but that's been in there from another branch. This branch looks great!

You don't really need the main_quit function; you can just connect close_callback to gtk.main_quit directly.
I don't know if that is frowned on, however :)

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

> The window's title doesn't support markup :)
> but that's been in there from another branch. This branch looks great!

Fixed!

> You don't really need the main_quit function; you can just connect
> close_callback to gtk.main_quit directly.

Yes, but right now we need to discard args and kwargs.

562. By Natalia Bidart

Removing markup from title.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

When I click reset password, and fill in my email address, I see a string with '%s', because line 560 in gui.py doesn't pass a string to interpolate.

Line 570 is too long.

The tests all pass!

The email address field does not check that a valid email address is entered.

The reset password button on the second reset password screen does not yet do anything, but that may be intentional. (For one thing we'll need to validate that the new password is the same in both fields.)

The connect button does not do anything yet. (which is also intentional, I think)

I find the ordering of the buttons confusing: I would expect the button to connect to be nearer the input fields, instead of the forgotten password button, since that is for exceptional cases. This is probably how it's designed though.

The 'Next' and 'Reset Password' buttons don't have shortkeys.

As long as all of the above is known and intentional or fixed before landing, +1

review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Also pep8 gives me these:

./mocker.py:4:80: E501 line too long (80 characters)
./mocker.py:36:1: E302 expected 2 blank lines, found 1
./mocker.py:100:13: E301 expected 1 blank line, found 0
./mocker.py:236:28: E225 missing whitespace around operator
./mocker.py:532:1: W291 trailing whitespace
./mocker.py:2038:23: W602 deprecated form of raising exception
./setup.py:51:21: E202 whitespace before ')'
./setup.py:94:16: E203 whitespace before ':'
./setup.py:84:48: E231 missing whitespace after ','
./setup.py:93:15: E251 no spaces around keyword / parameter equals
./contrib/dbus_util.py:74:1: W391 blank line at end of file
./ubuntu_sso/auth.py:30:14: E401 multiple imports on one line
./ubuntu_sso/auth.py:469:16: E201 whitespace after '{'
./ubuntu_sso/gui.py:164:57: E701 multiple statements on one line (colon)
./ubuntu_sso/main.py:239:46: E222 multiple spaces after operator

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

> When I click reset password, and fill in my email address, I see a string with
> '%s', because line 560 in gui.py doesn't pass a string to interpolate.

Fixed! (thanks)

> Line 570 is too long.

Fixed!

> The tests all pass!

Yey!

> The email address field does not check that a valid email address is entered.

Yes, this is a low priority feature on kanban.

> The reset password button on the second reset password screen does not yet do
> anything, but that may be intentional. (For one thing we'll need to validate
> that the new password is the same in both fields.)
>
> The connect button does not do anything yet. (which is also intentional, I
> think)

Intentional indeed.

> I find the ordering of the buttons confusing: I would expect the button to
> connect to be nearer the input fields, instead of the forgotten password
> button, since that is for exceptional cases. This is probably how it's
> designed though.

Designed that way.

> The 'Next' and 'Reset Password' buttons don't have shortkeys.

Yes... I'm opening a bug card on kanban for this.

563. By Natalia Bidart

Fixing corrections from Eric's review.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches