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

Bug 149607

Summary: Request repository credentials when they aren't set for repository
Product: z_Archived Reporter: Eugene Kuleshov <ekuleshov>
Component: MylynAssignee: Robert Elves <robert.elves>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: listas, wmitsuda
Version: unspecified   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 152212, 174864, 175064    

Description Eugene Kuleshov CLA 2006-07-04 19:56:25 EDT
When repository credentials are not set (e.g. after upgrading Eclipse) Mylar should show dialog and ask for those credentials like CVS and Subclipse team providers do.

Maybe it is even makes sense to remove credentials from repository configuration wizard like it was done in Subclipse team provider.
Comment 1 Robert Elves CLA 2007-01-18 11:40:37 EST
*** Bug 168672 has been marked as a duplicate of this bug. ***
Comment 2 Eugene Kuleshov CLA 2007-02-19 16:11:29 EST
Please also note that "anonymous" checkbox should NOT be derived from the user name and should be an explicitly saved separate property.
Comment 3 Mik Kersten CLA 2007-02-19 17:36:24 EST
Yes, it is very confusing how the repositories flip into anonymous mode.  
Comment 4 Eugene Kuleshov CLA 2007-02-19 17:53:57 EST
(In reply to comment #3)
> Yes, it is very confusing how the repositories flip into anonymous mode.  

It is not just confusing, but preventing to implement this logic to show the credential dialog if it is not an explicitly anonymous account.
Comment 5 Robert Elves CLA 2007-03-09 21:18:43 EST
Fixed. Added TaskRepository.isAnonymous() and TaskRepository.setAnonymous(boolean).  Checks for missing credentials upon startup and import of task list / repository data.  
Comment 6 Willian Mitsuda CLA 2007-04-18 19:26:39 EDT
Is this already fixed?

I'm using 3.3 I20070410-1043 + Mylar 2.0.0.v20070405-1130 and I just got in a situation where trying to submit a task make it popup a message box instructing me to go to repositories dialog (the credentials were blank) and set the credentials.

Was the purpose of this bug to show the credentials dialog or just preventing it from getting into the anonymous state?
Comment 7 Robert Elves CLA 2007-04-18 19:39:47 EDT
Checking was implemented so that if credentials were lost due to upgrade the credentials would be requested upon workbench startup. 

The Task Repository credentials page shouldn't allow to complete if not anonymous and no credentials provided (bug#18033).
Comment 8 Willian Mitsuda CLA 2007-04-18 19:48:32 EDT
(In reply to comment #7)
> Checking was implemented so that if credentials were lost due to upgrade the
> credentials would be requested upon workbench startup. 
> 

Strange, I don't remember having been asked for credentials on startup.

Note that actually I'm upgrading to I-builds and Mylar dev-builds on a weekly frequency, always over the same tasklist.
Comment 9 Robert Elves CLA 2007-04-18 20:17:25 EDT
This was tested this morning but perhaps we're missing some edge case here. Re-opening until we can confirm.
Comment 10 Eugene Kuleshov CLA 2007-04-18 20:18:35 EDT
Rob, how it supposed to work? I am pretty sure it does not work for JIRA and I also don't recall being asked for Bugzilla credentials.
Comment 11 Robert Elves CLA 2007-04-18 20:24:12 EDT
 (In reply to comment #10)
> Rob, how it supposed to work? I am pretty sure it does not work for JIRA and I
> also don't recall being asked for Bugzilla credentials.
Have a look at checkForCredentials() in TasksUiPlugin. It's being called from an asyncExec within the plugin's start method.
Comment 12 Mik Kersten CLA 2007-04-19 08:34:25 EDT
I just noticed it working on startup after clearing my credentials.  But I find it weird that the dialog shows before the workbench launches.  So I'm wondering if it should work like CVS and check on every synch or on first synch.  
Comment 13 Willian Mitsuda CLA 2007-04-19 19:42:02 EDT
(In reply to comment #12)
> But I find
> it weird that the dialog shows before the workbench launches.  So I'm wondering
> if it should work like CVS and check on every synch or on first synch.  
> 

+1. I think it should ask the credentials every time it tries to do some operation and it fails to authenticate due to invalid credentials, i.e. the fail triggers the dialog, like on CVS.
Comment 14 Willian Mitsuda CLA 2007-04-21 11:50:07 EDT
Note: it worked on my home machine after updating from 2.0.0.v20070420-0030 to 2.0.0.v20070421-0200.

But I still don't remember having been asked after updating to 2.0.0.v20070420-0030.
Comment 15 Robert Elves CLA 2007-04-21 12:12:38 EDT
There was a bug in previous builds and is now fixed but we should still investigate making this work like CVS.
Comment 16 Eugene Kuleshov CLA 2007-04-21 17:05:27 EDT
Funny. It is now asking for these credentials for web repository connector...
Comment 17 Eugene Kuleshov CLA 2007-04-21 17:37:07 EDT
 (In reply to comment #16)
> Funny. It is now asking for these credentials for web repository connector...

Fix committed to the head.
Comment 18 Robert Elves CLA 2007-04-27 00:17:15 EDT
Marking fixed as Task Repository settings page is displayed when submission via task editor (or attachments) fails due to login error. All other cases should be revealed as warning in task list as usual. 
Comment 19 Steffen Pingel CLA 2007-05-05 22:46:17 EDT
I find the prompt for missing credentials after start-up rather annoying. I have repositories that I don't use frequently and I do not want to enter the credentials for all those repositories after each Eclipse update or -clean run. It would also be nice not be forced to store credentials but make this optional as CVS does it.

Rob, since this seems partly done already, how difficult would it be to show the repository configuration dialog when the first user initiated repository operation fails?
Comment 20 Robert Elves CLA 2007-05-07 13:21:14 EDT
 (In reply to comment #19)
> Rob, since this seems partly done already, how difficult would it be to show the
> repository configuration dialog when the first user initiated repository
> operation fails?
I've added this for both posting attachments and submitting from task editor. I think we also need to cover search and manual synchronization. Updating attributes could use this as well.  This seems like a perfect case for aspects.