You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/05/11 21:15:59 UTC
[airavata] branch develop updated: AIRAVATA-3462 Remove entity when
GRP deleted
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 21770f0 AIRAVATA-3462 Remove entity when GRP deleted
21770f0 is described below
commit 21770f03822b0c2384fa51dc5200e10c2387a0a2
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue May 11 17:15:43 2021 -0400
AIRAVATA-3462 Remove entity when GRP deleted
---
.../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 a5e1894..faaa620 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
@@ -5556,9 +5556,9 @@ public class AiravataServerHandler implements Airavata.Iface {
RegistryService.Client regClient = registryClientPool.getResource();
SharingRegistryService.Client sharingClient = sharingClientPool.getResource();
try {
+ String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
if(ServerSettings.isEnableSharing()) {
try {
- String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
if (!sharingClient.userHasAccess(gatewayId, userId + "@" + gatewayId,
groupResourceProfileId, gatewayId + ":WRITE")){
@@ -5569,6 +5569,7 @@ public class AiravataServerHandler implements Airavata.Iface {
}
}
boolean result = regClient.removeGroupResourceProfile(groupResourceProfileId);
+ sharingClient.deleteEntity(gatewayId, groupResourceProfileId);
registryClientPool.returnResource(regClient);
sharingClientPool.returnResource(sharingClient);
return result;