Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oberlies2012-01-02 08:38:21 -0500
committerTobias Oberlies2012-01-09 09:23:37 -0500
commitc56d3086f43989513d7e3d2a149a0b6b1f82e9a7 (patch)
tree2fe59ce961a71a129c10520bf4d0ae582ad34639 /bundles/org.eclipse.equinox.p2.repository
parent47549f93278cc0296730577528c106b452b43420 (diff)
downloadrt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.tar.gz
rt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.tar.xz
rt.equinox.p2-c56d3086f43989513d7e3d2a149a0b6b1f82e9a7.zip
348366 Only remember cancel if dialog explicitly signals cancelv20120109-1423
- Introduced a new constant in UIServices to give the implementations the possibility to explicitly indicate that the user cancelled a prompt for password. - Only remember cancel in class Credentials on explicit user cancels. This ensures that the authentication prompt is shown at least once. Bug: 348366 - [repository] Cannot update from update site with authentication
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java8
3 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
index 692c9c6a7..524be7d70 100644
--- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true
-Bundle-Version: 2.1.0.qualifier
+Bundle-Version: 2.1.100.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.repository/pom.xml b/bundles/org.eclipse.equinox.p2.repository/pom.xml
index bb8b06c9a..ef4538821 100644
--- a/bundles/org.eclipse.equinox.p2.repository/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.repository/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.repository</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>2.1.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
index 309757241..96cd71426 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2012 IBM Corporation and others.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
@@ -233,13 +233,15 @@ public class Credentials {
loginDetails = lastUsed != null ? adminUIService.getUsernamePassword(host, lastUsed) : adminUIService.getUsernamePassword(host);
//null result means user canceled password dialog
if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- if (loginDetails == null)
+ if (loginDetails == UIServices.AUTHENTICATION_PROMPT_CANCELED)
DebugHelper.debug("Credentials", "forLocation:PROMPTED - USER CANCELED (PROMPT LOCK RELEASED)", // //$NON-NLS-1$ //$NON-NLS-2$
new Object[] {"host", location}); //$NON-NLS-1$
}
- if (loginDetails == null) {
+ if (loginDetails == UIServices.AUTHENTICATION_PROMPT_CANCELED) {
rememberCancel(host);
throw new LoginCanceledException();
+ } else if (loginDetails == null) {
+ throw new LoginCanceledException();
}
//save user name and password if requested by user
if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {

Back to the top