Author: adietish
Date: 2012-02-16 05:04:32 -0500 (Thu, 16 Feb 2012)
New Revision: 38807
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
[JBIDE-10931] also storing/creating the user if the user is valid but has no domain
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16
09:09:11 UTC (rev 38806)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16
10:04:32 UTC (rev 38807)
@@ -201,21 +201,17 @@
private IStatus getValidityStatus(String rhLogin, String password) {
IStatus status = Status.OK_STATUS;
+ IUser user = null;
try {
- IUser user = UserModel.getDefault().createUser(getRhLogin(), getPassword());
+ user = UserModel.getDefault().createUser(getRhLogin(), getPassword());
if (user.isValid()) {
- setUser(user);
- if (rememberPassword) {
- storePassword(password);
- } else {
- erasePasswordStore();
- }
+ storeUser(user);
} else {
status = OpenShiftUIActivator.createErrorStatus(
NLS.bind("The credentials for user {0} are not valid",
user.getRhlogin()));
-
}
} catch (NotFoundOpenShiftException e) {
+ storeUser(user);
// valid user without domain
} catch (Exception e) {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
@@ -224,4 +220,13 @@
return status;
}
+ private void storeUser(IUser user) {
+ setUser(user);
+ if (rememberPassword) {
+ storePassword(password);
+ } else {
+ erasePasswordStore();
+ }
+ }
+
}
Show replies by date