Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350678

Summary: support authentication by account id in 'development only mode'
Product: z_Archived Reporter: Alex Blewitt <alex.blewitt>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: matthias.sohn
Version: 0.8   
Target Milestone: 0.9   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Alex Blewitt CLA 2011-06-29 06:28:46 EDT
Version 0.8 of the Mylyn Gerrit reviews doesn't authenticate when the user is in 'development_become_any_account' mode. In this case, the login is something like http://localhost:8080/become?account_id=1000000 and has no password.

When I try to put in a user of 1000000 in Mylyn, when pointing to a back-end instance, the login fails with 'Unexpected error: 200 (OK)'.

Given that people aren't likely to use this in real systems, this is probably a minor issue to have, but it would be nice if there were some way of dealing with this response code and letting the user log in/comment in dev mode, for demo and familiarity purposes.
Comment 1 Matthias Sohn CLA 2011-06-30 10:43:15 EDT
Mylyn Reviews is another product
Comment 2 Steffen Pingel CLA 2011-06-30 11:17:26 EDT
I have been using development mode in several different 2.1.x instances. Which version of Gerrit are you using? Can you try entering the username rather than the number (not sure latter is supported)?
Comment 3 Alex Blewitt CLA 2011-06-30 13:23:17 EDT
Ah, I see. If I use the 'username' then it works fine with no password. I was expecting it to also be the same with the account number as well (since you can use both for the 'become' screen). I've updated the bug title to reflect that, but can confirm the username works against 2.1.7 ...
Comment 4 Steffen Pingel CLA 2011-07-26 13:53:54 EDT
Thanks for verifying. I have updated the summary accordingly.
Comment 5 Steffen Pingel CLA 2011-09-08 06:17:09 EDT
I have added a simple heuristic:
1. If the provided username has an '@' authentication is attempted using the preferred email field
2. If the provided username is numeric authentication is attempted using the account id field
3. Otherwise authentication is attempted using the user id field
Comment 6 Steffen Pingel CLA 2011-09-08 06:17:13 EDT
Created attachment 202981 [details]
mylyn/context/zip