diff options
author | shawn.f.cook | 2012-03-23 22:24:55 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2012-03-23 22:24:55 +0000 |
commit | a2d5dc3a3a38fa0a38d22a34eb0624e9de1de0ce (patch) | |
tree | 19bcd34fd1dece3eb11b183e7bbce829c08ad1e5 /plugins/org.eclipse.osee.framework.core.client | |
parent | f77467ac5a12823dc31eb7c0f4ff872b82e6c73d (diff) | |
download | org.eclipse.osee-a2d5dc3a3a38fa0a38d22a34eb0624e9de1de0ce.tar.gz org.eclipse.osee-a2d5dc3a3a38fa0a38d22a34eb0624e9de1de0ce.tar.xz org.eclipse.osee-a2d5dc3a3a38fa0a38d22a34eb0624e9de1de0ce.zip |
bug: Fix synchronization issue in user authentication code
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.client')
-rw-r--r-- | plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java index f94e5d04bbc..ab8588937ba 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java @@ -37,6 +37,7 @@ import org.eclipse.osee.framework.core.data.OseeCodeVersion; import org.eclipse.osee.framework.core.data.OseeCredential; import org.eclipse.osee.framework.core.data.OseeServerContext; import org.eclipse.osee.framework.core.data.OseeSessionGrant; +import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.framework.core.exception.OseeAuthenticationRequiredException; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; @@ -133,7 +134,9 @@ public class InternalClientSessionManager { @Override public OseeCredential getCredential() { OseeCredential credential = super.getCredential(); - credential.setUserName(System.getProperty("user.name")); + String userName = + OseeClientProperties.isInDbInit() ? SystemUser.BootStrap.getName() : System.getProperty("user.name"); + credential.setUserName(userName); credential.setDomain(""); credential.setPassword(""); credential.setAuthenticationProtocol(OseeClientProperties.getAuthenticationProtocol()); @@ -209,6 +212,7 @@ public class InternalClientSessionManager { parameters.put("operation", "create"); String url = HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(OseeServerContext.SESSION_CONTEXT, parameters); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); AcquireResult result = HttpProcessor.post(new URL(url), asInputStream(credential), "text/xml", "UTF-8", outputStream); |