diff options
author | Roland Grunberg | 2016-06-01 15:49:08 +0000 |
---|---|---|
committer | Jeff Johnston | 2016-06-02 20:46:21 +0000 |
commit | e5cc77960c4dd16b56ce767d6b2a2d154c945985 (patch) | |
tree | ec938564ba479df2847d95edc23bf4b2d294ae27 | |
parent | 146087222ac3db744ca9537e5e72fc7c2a3d8add (diff) | |
download | org.eclipse.linuxtools-e5cc77960c4dd16b56ce767d6b2a2d154c945985.tar.gz org.eclipse.linuxtools-e5cc77960c4dd16b56ce767d6b2a2d154c945985.tar.xz org.eclipse.linuxtools-e5cc77960c4dd16b56ce767d6b2a2d154c945985.zip |
Bug 495075: Don't force re-typing password on registry account changes.
Attempting to modify the registry account brought up the old values
(server name, user name, email), but set the password empty so that
users would have to re-type it to confirm identity. Since the secure
storage framework authenticates the user anyways, the password should be
populated like everything else.
Change-Id: I748b349b28f988356759b85d2052dde61369841c
Reviewed-on: https://git.eclipse.org/r/74265
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
2 files changed, 9 insertions, 6 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerRegistryAccountPreferencePage.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerRegistryAccountPreferencePage.java index 0ed34b1258..96528ee5fd 100644 --- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerRegistryAccountPreferencePage.java +++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/preferences/DockerRegistryAccountPreferencePage.java @@ -294,8 +294,7 @@ public class DockerRegistryAccountPreferencePage extends PreferencePage int index = pwdTable.getSelectionIndex(); IRegistryAccount info = passwords .get(index); - dialog.setInputData(info.getServerAddress(), info.getUsername(), - info.getEmail()); + dialog.setInputData(info); if (dialog.open() == Window.OK) { // Remove old and add new info = dialog.getSignonInformation(); diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/RegistryAccountDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/RegistryAccountDialog.java index e03a30ed8d..595908a9d7 100644 --- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/RegistryAccountDialog.java +++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/RegistryAccountDialog.java @@ -105,6 +105,9 @@ public class RegistryAccountDialog extends Dialog { passwordText.setEchoChar('*'); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) .grab(true, false).applyTo(passwordText); + if (password != null) { + passwordText.setText(new String(password)); + } passwordText.addModifyListener(e -> { password = passwordText.getText().toCharArray(); validate(); @@ -123,10 +126,11 @@ public class RegistryAccountDialog extends Dialog { } } - public void setInputData(String serverAddress, String username, String email) { - this.serverAddress = serverAddress; - this.username = username; - this.email = email; + public void setInputData(IRegistryAccount info) { + this.serverAddress = info.getServerAddress(); + this.username = info.getUsername(); + this.email = info.getEmail(); + this.password = info.getPassword(); } public IRegistryAccount getSignonInformation() { |