diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java index 64df17fdcf026723faf621be68cce474928821f5..df70852635d7859d896ebabf2c428d0398c8f8cd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java @@ -147,7 +147,8 @@ public abstract class AbstractServer<T extends IServer> extends AbstractServiceW return roleAssignmentPE; } - protected final PersonPE createPerson(final Principal principal, final PersonPE registrator) + protected final PersonPE createPerson(final Principal principal, final PersonPE registrator, + DisplaySettings defaultDisplaySettings) { final PersonPE person = new PersonPE(); person.setUserId(principal.getUserId()); @@ -156,6 +157,7 @@ public abstract class AbstractServer<T extends IServer> extends AbstractServiceW person.setEmail(principal.getEmail()); person.setRegistrator(registrator); person.setDatabaseInstance(daoFactory.getHomeDatabaseInstance()); + person.setDisplaySettings(defaultDisplaySettings); try { daoFactory.getPersonDAO().createPerson(person); @@ -249,7 +251,8 @@ public abstract class AbstractServer<T extends IServer> extends AbstractServiceW if (person == null) { final PersonPE systemUser = getSystemUser(persons); - person = createPerson(session.getPrincipal(), systemUser); + final DisplaySettings defaultDisplaySettings = getDefaultDisplaySettings(sessionToken); + person = createPerson(session.getPrincipal(), systemUser, defaultDisplaySettings); } else { HibernateUtils.initialize(person.getAllPersonRoles()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java index c1650a92f674bd4d3a5bf2c9d2566b263da70c03..58a097cb13d40ef2caf8a14666a487a3f38e5f8f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java @@ -87,6 +87,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatastoreServiceDescription; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DeletedDataSet; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DetailedSearchCriteria; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DisplaySettings; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; @@ -277,13 +278,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServer> impl throw new EnvironmentFailureException("Authentication service cannot be accessed."); } List<String> unknownUsers = new ArrayList<String>(); + final DisplaySettings defaultDisplaySettings = getDefaultDisplaySettings(sessionToken); for (String userID : userIDs) { try { final Principal principal = authenticationService.getPrincipal(applicationToken, userID); - createPerson(principal, session.tryGetPerson()); + createPerson(principal, session.tryGetPerson(), defaultDisplaySettings); } catch (final IllegalArgumentException e) { unknownUsers.add(userID);