airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata] branch develop updated: Fix for setting ownerId on new group
Date Tue, 23 Jan 2018 22:38:13 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
     new 6f4ae17  Fix for setting ownerId on new group
6f4ae17 is described below

commit 6f4ae172524119da280dacf290c04e27060aa5f2
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Tue Jan 23 17:38:00 2018 -0500

    Fix for setting ownerId on new group
---
 .../service/profile/handlers/GroupManagerServiceHandler.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
index 62f27a5..fd93ba8 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
@@ -41,11 +41,13 @@ public class GroupManagerServiceHandler implements GroupManagerService.Iface
{
             sharingUserGroup.setName(groupModel.getName());
             sharingUserGroup.setDescription(groupModel.getDescription());
             sharingUserGroup.setGroupType(GroupType.USER_LEVEL_GROUP);
-            sharingUserGroup.setDomainId(authzToken.getClaimsMap().get(Constants.GATEWAY_ID));
-            sharingUserGroup.setOwnerId(authzToken.getClaimsMap().get(Constants.USER_NAME));
+            String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+            sharingUserGroup.setDomainId(gatewayId);
+            String username = authzToken.getClaimsMap().get(Constants.USER_NAME);
+            sharingUserGroup.setOwnerId(username + "@" + gatewayId);
 
             String groupId = sharingClient.createGroup(sharingUserGroup);
-            sharingClient.addUsersToGroup(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
groupModel.getMembers(), groupId);
+            sharingClient.addUsersToGroup(gatewayId, groupModel.getMembers(), groupId);
             return groupId;
         }
         catch (Exception e) {

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.

Mime
View raw message