diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/DataSetRegistrationAlgorithm.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/DataSetRegistrationAlgorithm.java index 019b0446851f72b3ba3a769d996adb8b63dad676..bf3e04e0906bfcce64987c49ec7a099f919f35d1 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/DataSetRegistrationAlgorithm.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/DataSetRegistrationAlgorithm.java @@ -432,6 +432,7 @@ public abstract class DataSetRegistrationAlgorithm private NewExternalData createExternalData() { final NewExternalData data = new NewExternalData(); + data.setUserId(dataSetInformation.getUploadingUserIdOrNull()); data.setUserEMail(dataSetInformation.tryGetUploadingUserEmail()); data.setExtractableData(dataSetInformation.getExtractableData()); data.setLocatorType(getTypeExtractor().getLocatorType(incomingDataSetFile)); diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/api/v1/PutDataSetExecutor.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/api/v1/PutDataSetExecutor.java index f3d48df68bd8ab3abcb4ef7d86318a1cf03bed10..70d893d664346835052a9d370d7ff9864f1dcdaa 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/api/v1/PutDataSetExecutor.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/api/v1/PutDataSetExecutor.java @@ -607,11 +607,7 @@ class PutDataSetExecutor implements IDataSetHandlerRpc final SessionContextDTO session = service.getOpenBisService().tryGetSession(sessionToken); - dataSetInfo.setUploadingUserEmail(session.getUserEmail()); - - // TODO 2010-06-10, CR, LMS-1564: When registering, set the registrator to the session - // owner; only an admin on - // the space or an ETL server can override. + dataSetInfo.setUploadingUserId(session.getUserName()); return dataSetInfo; } } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/dto/DataSetInformation.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/dto/DataSetInformation.java index 4cc519bd78076d08971bead4dbc55074f42dac3a..9aa6790a67c63af2cafa6517dc6fda6b2b2613cd 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/dto/DataSetInformation.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/dto/DataSetInformation.java @@ -88,6 +88,8 @@ public class DataSetInformation implements Serializable * Email of uploading user. */ private String uploadingUserEmailOrNull; + + private String uploadingUserIdOrNull; /** This constructor is for serialization. */ public DataSetInformation() @@ -104,6 +106,16 @@ public class DataSetInformation implements Serializable this.uploadingUserEmailOrNull = uploadingUserEmail; } + public void setUploadingUserId(String uploadingUserIdOrNull) + { + this.uploadingUserIdOrNull = uploadingUserIdOrNull; + } + + public String getUploadingUserIdOrNull() + { + return uploadingUserIdOrNull; + } + public final BooleanOrUnknown getIsCompleteFlag() { return isCompleteFlag;