Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java10
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties1
3 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
index eec8b8dcf..e6c9afe86 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
@@ -109,5 +109,7 @@ public class Messages extends NLS {
public static String TracRepositorySettingsPage_No_Trac_repository_found_at_url;
+ public static String TracRepositorySettingsPage_NTLM_authentication_requested_Error;
+
public static String TracRepositorySettingsPage_Trac_Repository_Settings;
}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
index 62bbd5afe..d67a1b026 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
@@ -21,6 +21,8 @@ import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AbstractWebLocation;
+import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
+import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
@@ -186,6 +188,14 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
TracUiPlugin.ID_PLUGIN, INVALID_REPOSITORY_URL));
} catch (TracLoginException e) {
+ if (e.isNtlmAuthRequested()) {
+ AuthenticationCredentials credentials = taskRepository.getCredentials(AuthenticationType.REPOSITORY);
+ if (!credentials.getUserName().contains("\\")) { //$NON-NLS-1$
+ throw new CoreException(
+ RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR, TracUiPlugin.ID_PLUGIN,
+ Messages.TracRepositorySettingsPage_NTLM_authentication_requested_Error));
+ }
+ }
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
TracUiPlugin.ID_PLUGIN, INVALID_LOGIN));
} catch (TracPermissionDeniedException e) {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
index a1b5ede07..aadda7252 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
@@ -52,4 +52,5 @@ TracRepositorySettingsPage_Authentication_credentials_valid_Update_to_latest_Xml
TracRepositorySettingsPage_Automatic__Use_Validate_Settings_=Automatic (Use Validate Settings)
TracRepositorySettingsPage_EXAMPLE_HTTP_TRAC_EDGEWALL_ORG=Example: http://trac.edgewall.org
TracRepositorySettingsPage_No_Trac_repository_found_at_url=No Trac repository found at url
+TracRepositorySettingsPage_NTLM_authentication_requested_Error=NTLM authentication failed. Verify that the username is in the format 'DOMAIN\\user' and NTLM v1 is used.
TracRepositorySettingsPage_Trac_Repository_Settings=Trac Repository Settings

Back to the top