airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject airavata git commit: AIRAVATA-2558 Fix paging for getUserProjects
Date Wed, 11 Oct 2017 16:23:26 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 95cb20401 -> 1a6606fd4


AIRAVATA-2558 Fix paging for getUserProjects

Don't apply limit/offset when getting accessible ids but do apply when
querying the registry. This is the same way searchProjects works.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1a6606fd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1a6606fd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1a6606fd

Branch: refs/heads/develop
Commit: 1a6606fd4c540389fb28b7ce1733d1d6e32bc720
Parents: 95cb204
Author: Marcus Christie <machristie@apache.org>
Authored: Wed Oct 11 12:21:55 2017 -0400
Committer: Marcus Christie <machristie@apache.org>
Committed: Wed Oct 11 12:21:55 2017 -0400

----------------------------------------------------------------------
 .../apache/airavata/api/server/handler/AiravataServerHandler.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1a6606fd/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
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 162260e..4990fe2 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
@@ -949,7 +949,8 @@ public class AiravataServerHandler implements Airavata.Iface {
                 searchCriteria.setValue(gatewayId + ":PROJECT");
                 filters.add(searchCriteria);
                 sharingClient.searchEntities(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
-                        userName + "@" + gatewayId, filters, offset, limit).stream().forEach(p
-> accessibleProjectIds.add(p.entityId));
+                        userName + "@" + gatewayId, filters, 0, -1).stream().forEach(p ->
accessibleProjectIds
+                        .add(p.entityId));
                 List<Project> result = regClient.searchProjects(gatewayId, userName,
accessibleProjectIds, new HashMap<>(), limit, offset);
                 registryClientPool.returnResource(regClient);
                 sharingClientPool.returnResource(sharingClient);


Mime
View raw message