airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [36/49] airavata git commit: fixing sharing issue
Date Sat, 01 Oct 2016 23:46:58 GMT
fixing sharing issue


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

Branch: refs/heads/lahiru/AIRAVATA-2107
Commit: c084683579ee27290db8a9b67051ea11726e2335
Parents: f3b8e02
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Sep 21 22:07:20 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Sep 21 22:07:20 2016 -0400

----------------------------------------------------------------------
 .../airavata/api/server/handler/AiravataServerHandler.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c0846835/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 74c4eb3..5ccf874 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
@@ -499,12 +499,16 @@ public class AiravataServerHandler implements Airavata.Iface {
 
         try {
             String projectId = getRegistryServiceClient().createProject(gatewayId, project);
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
             Resource projResource = new Resource(projectId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
             projResource.setOwnerId(project.getOwner() + "@" + project.getGatewayId());
             projResource.setName(project.getName());
             projResource.setDescription(project.getDescription());
-            groupManager.createResource(projResource);
+
+            if(ServerSettings.isEnableSharing()){
+                GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+                groupManager.createResource(projResource);
+            }
+
             logger.debug("Airavata created project with project Id : " + projectId + " for
gateway Id : " + gatewayId);
             return projectId;
         } catch (Exception e) {


Mime
View raw message