airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata] 01/02: AIRAVATA-3102 Use authenticating user's username to search sharing catalog
Date Wed, 10 Jul 2019 19:49:17 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 59da61521890cba656503099744906a21637beec
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed Jul 10 15:48:46 2019 -0400

    AIRAVATA-3102 Use authenticating user's username to search sharing catalog
---
 .../org/apache/airavata/api/server/handler/AiravataServerHandler.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 6e091a5..5c322ee 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1257,8 +1257,9 @@ public class AiravataServerHandler implements Airavata.Iface {
             toCreatedTimeCriteria.setSearchCondition(SearchCondition.LTE);
             toCreatedTimeCriteria.setValue(Long.toString(toTime));
             sharingFilters.add(toCreatedTimeCriteria);
+            String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
             sharingClient.searchEntities(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
-                    userName + "@" + gatewayId, sharingFilters, 0, -1).forEach(e -> accessibleExpIds.add(e.getEntityId()));
+                    userId + "@" + gatewayId, sharingFilters, 0, -1).forEach(e -> accessibleExpIds.add(e.getEntityId()));
 
             ExperimentStatistics result = regClient.getExperimentStatistics(gatewayId, fromTime,
toTime, userName, applicationName, resourceHostName, accessibleExpIds);
             registryClientPool.returnResource(regClient);


Mime
View raw message