| Summary: | use command parameter slideout to collect repo credentials | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Git | Assignee: | Susan McCourt <susan> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | malgorzata.tomczyk, Szymon.Brandys |
| Version: | 0.3 | ||
| Target Milestone: | 0.4 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
This is not something that is straightforward for me to figure out because there are many layers involved (ssh service, dialog happens down in the auth error handler, etc.) and I'm not sure how it's supposed to work. The basic pattern is as follows (look at the cloneRepository command as it does this very same thing). 1) define the command as having username and ssh password parameters, and more options (which would invoke the dialog for private key, etc.). 2) you can default the username parameter if you already know it 3) when the command is invoked, the slideout would come out prompting for user and ssh password, with a more button that invokes the entire dialog if they need the private key instead 4) the callback gets changed to look for values in the command parameters before deciding to invoke the dialog. It's also nice if the dialog values are defaulted to anything that was put in the slideout. The current layering of the code doesn't make it as simple as it was for cloneRepository, so I'll leave this to those that understand the code. A nice benefit that would come from this is that the parameter remembers the last input value, so until a page reload, you would only have to enter the ssh password once. fixed in commit 3205b4330f6baecdeb7a5a53c5e0e57290459be7 Once I took the time to figure out what this code was doing, it wasn't too bad. I changed the code so that the generic fetch/push commands use the parameters and the slideout. This means that you'll get slideouts on the git log page, and you'll get some tooltip dialogs in the menus on the git clones page. I did not convert the git status commands because I don't think a behavior besides using the dialogs makes sense at this time. The slideout is too far up on the page from where you are working. We can revisit this. (In reply to comment #1) > A nice benefit that would come from this is that the parameter remembers the > last input value, so until a page reload, you would only have to enter the ssh > password once. This made me a bit nervous, so I talked to Simon about it, and he didn't have a problem with storing the password in the memory. But it felt wrong to get that behavior as a side effect of how command parameters work. I had it working and it was mighty convenient, but in the end, the behavior changed when I fixed bug 364668. Command parameters are only remembered per invocation/rendering, and since the git page rerenders commands after an operation, the last parameter values are lost. |