Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(499)

Issue 7129055: Do not attempt login if ws is not connected

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by frankban
Modified:
11 years, 4 months ago
Reviewers:
mp+143840
Visibility:
Public.

Description

Do not attempt login if ws is not connected Based on Brad's branch [1], this one moves the connection check from the environment to the application. If the environment is not connected the application suspends the authentication process waiting for the connection to be established. Avoiding the execution of check_user_credentials if the ws is not ready also fixes a test problem for which we added a work-around. The env.login now checks for credentials, as suggested by Kapil. Also added tests. [1] https://codereview.appspot.com/7130051/ https://code.launchpad.net/~frankban/juju-gui/1099909/+merge/143840 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Do not attempt login if ws is not connected #

Total comments: 6

Patch Set 3 : Do not attempt login if ws is not connected #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -9 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 2 chunks +6 lines, -5 lines 0 comments Download
M app/store/env.js View 2 chunks +6 lines, -3 lines 0 comments Download
M test/test_app.js View 1 2 1 chunk +49 lines, -0 lines 0 comments Download
M test/test_env.js View 2 chunks +20 lines, -0 lines 0 comments Download
M test/test_login.js View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 6
frankban
Please take a look.
11 years, 4 months ago (2013-01-18 10:17:46 UTC) #1
bac
Thanks for picking up this branch in my absence and improving it greatly. It looks ...
11 years, 4 months ago (2013-01-18 11:56:37 UTC) #2
frankban
Please take a look. https://codereview.appspot.com/7129055/diff/1/test/test_login.js File test/test_login.js (right): https://codereview.appspot.com/7129055/diff/1/test/test_login.js#newcode23 test/test_login.js:23: // env.set('connected', true); On 2013/01/18 ...
11 years, 4 months ago (2013-01-18 13:42:10 UTC) #3
benji
This looks good. Feel free to land after responding to my comments. https://codereview.appspot.com/7129055/diff/5001/app/store/env.js File app/store/env.js ...
11 years, 4 months ago (2013-01-18 14:29:21 UTC) #4
frankban
Hi Brad and Benji, thanks for the reviews. https://codereview.appspot.com/7129055/diff/5001/app/store/env.js File app/store/env.js (right): https://codereview.appspot.com/7129055/diff/5001/app/store/env.js#newcode303 app/store/env.js:303: } ...
11 years, 4 months ago (2013-01-18 14:45:21 UTC) #5
frankban
11 years, 4 months ago (2013-01-18 14:48:23 UTC) #6
*** Submitted:

Do not attempt login if ws is not connected

Based on Brad's branch [1], this one moves the
connection check from the environment to
the application. If the environment is not
connected the application suspends the 
authentication process waiting for the 
connection to be established. Avoiding
the execution of check_user_credentials if
the ws is not ready also fixes a test problem 
for which we added a work-around.

The env.login now checks for credentials,
as suggested by Kapil.

Also added tests.

[1] https://codereview.appspot.com/7130051/

R=bac, benji
CC=
https://codereview.appspot.com/7129055
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b