From 68828d27381b81fa19b8e8e471637c9b2fa7f6b4 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Wed, 15 Jun 2016 10:57:43 +0000 Subject: [PATCH] SSDM-3733 : Getting user email from session, now all users can use the exports SVN: 36685 --- .../1/dss/reporting-plugins/exports-api/exports-api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py index 19b3d9b85b6..8693b515a48 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py @@ -105,7 +105,7 @@ def expandAndexport(tr, params): #Services used during the export process # TO-DO Login on the services as ETL server but on behalf of the user that makes the call sessionToken = params.get("sessionToken"); - v3 = HttpInvokerUtils.createServiceStub(IApplicationServerApi, OPENBISURL + IApplicationServerApi.SERVICE_URL, 30 * 1000); + v3 = ServiceProvider.getV3ApplicationService(); v3d = ServiceProvider.getApplicationContext().getBean(V3_DSS_BEAN); mailClient = tr.getGlobalState().getMailClient(); @@ -114,7 +114,7 @@ def expandAndexport(tr, params): entities = params.get("entities"); includeRoot = params.get("includeRoot"); - userEmail = params.get("userEmail"); + userEmail = v3.getSessionInformation(sessionToken).getPerson().getEmail(); for entity in entities: entityAsPythonMap = { "type" : entity.get("type"), "permId" : entity.get("permId"), "expand" : entity.get("expand") }; entitiesToExport.append(entityAsPythonMap); @@ -204,7 +204,7 @@ def expandAndexport(tr, params): def export(sessionToken, entities, includeRoot, userEmail, mailClient): #Services used during the export process - v3 = HttpInvokerUtils.createServiceStub(IApplicationServerApi, OPENBISURL + IApplicationServerApi.SERVICE_URL, 30 * 1000); + v3 = ServiceProvider.getV3ApplicationService(); v3d = ServiceProvider.getApplicationContext().getBean(V3_DSS_BEAN); dssComponent = DssComponentFactory.tryCreate(sessionToken, OPENBISURL); -- GitLab