Skip to content
Snippets Groups Projects
Commit a2abfdca authored by Cristina Cocho's avatar Cristina Cocho
Browse files

Use computer full name instead of user name for main client in token

manager
parent 2167d17b
No related branches found
No related tags found
No related merge requests found
4.3.28 25/04/2024
------
* Use computer full name instead of user name for main client in token manager.
4.3.27 23/04/2024
------
* Add some debug messages.
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ill.ics</groupId>
<artifactId>nomadgui</artifactId>
<version>4.3.27</version>
<version>4.3.28</version>
<name>NomadGUI</name>
<description>Graphical user interface for Nomad</description>
<scm>
......
......@@ -136,11 +136,7 @@ public class ExperimentData implements IPropertyChangeListener {
}
if ((usernameProperty != null || connectedUserNameProperty != null) && instrumentNameProperty != null) {
if (ConfigManager.getInstance().isMainClient()) {
if (connectedUserNameProperty != null) {
SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).setSessionInformation(connectedUserNameProperty.getServerValue(), "", instrumentNameProperty.getServerValue());
} else {
SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).setSessionInformation(usernameProperty.getServerValue(), "", instrumentNameProperty.getServerValue());
}
SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).setSessionInformation(Nomad.getComputerFullName(), "", instrumentNameProperty.getServerValue());
}
}
} else {
......
......@@ -24,6 +24,7 @@ import fr.ill.ics.bridge.LoginManager.LoginIncorrectException;
import fr.ill.ics.bridge.LoginManager.MultipleClientsPerEndpointNotAllowedException;
import fr.ill.ics.bridge.LoginManager.MultipleConnectionsPerUserNotAllowedException;
import fr.ill.ics.bridge.command.CommandZoneWrapper;
import fr.ill.ics.common.Nomad;
import fr.ill.ics.util.exception.ExitException;
public class ServerConnection {
......@@ -59,7 +60,7 @@ public class ServerConnection {
public int login(String login, boolean standalone) {
// Check login and password
try {
LoginManager.getInstance().login(login, standalone, CommandZoneWrapper.SERVER_ID);
LoginManager.getInstance().login(Nomad.getComputerFullName(), standalone, CommandZoneWrapper.SERVER_ID);
loginState = LOGIN_OK;
} catch (MultipleClientsPerEndpointNotAllowedException e) {
loginState = LOGIN_REFUSED_MULTIPLE_CLIENTS;
......
......@@ -17,6 +17,7 @@
*/
package fr.ill.ics.client.view.users.swt;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.swt.SWT;
......@@ -235,8 +236,10 @@ public class SWTConnectedUsers extends ConnectedUsers {
composite.setLayoutData(SWTWidgetFactory.getInstance().getHorizontalGridData());
composite.setLayout(SWTWidgetFactory.getInstance().getInsideGridLayoutWithVerticalSpacing(3));
composite.setBackground(SWTColorFactory.getUsersBackgroundColor());
if (SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getConnectedUsers() != null) {
for (ConnectedUser user : SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getConnectedUsers()) {
List<ConnectedUser> users = SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getConnectedUsers();
if (users != null) {
for (ConnectedUser user : users) {
LOGGER.logp(Level.INFO, this.getClass().getName(), "refreshList", "User " + user);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment