This is an automated email from the git hooks/post-receive script. xhaakon-guest pushed a commit to branch master in repository eclipse-mylyn.
commit 0c90349f0d009f36fbaf4ecf6f62ab3cdf320056 Author: Jakub Adam <[email protected]> Date: Mon Oct 14 17:50:00 2013 +0200 Support Bugzilla authenticated solely via HTTP Allows Mylyn to log into Bugzilla instances that delegate authentication to its HTTP server and reuse the login name it provides. --- debian/changelog | 6 +++ debian/patches/bugzilla-http-authentication.patch | 51 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 58 insertions(+) diff --git a/debian/changelog b/debian/changelog index b6fade7..e06f010 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +eclipse-mylyn (3.9.1-2) UNRELEASED; urgency=low + + * Support Bugzilla authenticated solely via HTTP. + + -- Jakub Adam <[email protected]> Mon, 14 Oct 2013 17:49:11 +0200 + eclipse-mylyn (3.9.1-1) unstable; urgency=low * New upstream release. diff --git a/debian/patches/bugzilla-http-authentication.patch b/debian/patches/bugzilla-http-authentication.patch new file mode 100644 index 0000000..e250860 --- /dev/null +++ b/debian/patches/bugzilla-http-authentication.patch @@ -0,0 +1,51 @@ +From: Jakub Adam <[email protected]> +Date: Mon, 14 Oct 2013 19:15:19 +0200 +Subject: bugzilla-http-authentication + +--- + .../org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java | 4 +++- + .../internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java | 9 ++++++++- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java +index 06647e6..0770dfd 100644 +--- a/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java ++++ b/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java +@@ -466,7 +466,9 @@ public class BugzillaClient { + throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, + RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(), + "Proxy authentication required")); //$NON-NLS-1$ +- ++ } else if (code == HttpURLConnection.HTTP_MOVED_TEMP && credentials == null) { ++ // With only HTTP authentication, getting 302 basically means success ++ loggedIn = true; + } else if (code != HttpURLConnection.HTTP_OK) { + loggedIn = false; + WebUtil.releaseConnection(postMethod, monitor); +diff --git a/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java +index b5f2711..590d9ef 100644 +--- a/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java ++++ b/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java +@@ -27,6 +27,8 @@ import org.eclipse.jface.fieldassist.ControlDecoration; + import org.eclipse.jface.fieldassist.FieldDecoration; + import org.eclipse.jface.fieldassist.FieldDecorationRegistry; + import org.eclipse.mylyn.commons.core.StatusHandler; ++import org.eclipse.mylyn.commons.net.AuthenticationCredentials; ++import org.eclipse.mylyn.commons.net.AuthenticationType; + import org.eclipse.mylyn.commons.workbench.WorkbenchUtil; + import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute; + import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; +@@ -605,7 +607,12 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage { + private boolean checkCanSubmit(final int type) { + final TaskRepository taskRepository = getModel().getTaskRepository(); + String username = taskRepository.getUserName(); +- if (username == null || username.length() == 0) { ++ String httpUsername = null; ++ AuthenticationCredentials httpCredentials = taskRepository.getCredentials(AuthenticationType.HTTP); ++ if (httpCredentials != null) { ++ httpUsername = httpCredentials.getPassword(); ++ } ++ if ((username == null || username.length() == 0) && (httpUsername == null || httpUsername.length() == 0)) { + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + public void run() { + getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Anonymous_can_not_submit_Tasks, type, diff --git a/debian/patches/series b/debian/patches/series index cff0a70..23624aa 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ rebuild-prepare-install-profile-job-3-6.patch remove-eclipse-ecf-usage.patch mylyn-builds-fix-ecore-repository-location.patch org.eclipse.mylyn.ide.ui-to-context-common.patch +bugzilla-http-authentication.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/eclipse-mylyn.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

