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 2018/06/18 18:42:41 UTC
[airavata] 01/02: AIRAVATA-2837 Log when groupResourceProfileId is
missing
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch group-based-auth
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 19a0373b933286bf4ce404af2a5f3701db7ec896
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Jun 18 14:39:55 2018 -0400
AIRAVATA-2837 Log when groupResourceProfileId is missing
---
.../org/apache/airavata/api/server/handler/AiravataServerHandler.java | 4 +++-
1 file changed, 3 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 0fe59ac..cc81dfd 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
@@ -1868,7 +1868,9 @@ public class AiravataServerHandler implements Airavata.Iface {
List<GroupResourceProfile> groupResourceProfiles = getGroupResourceList(authzToken, gatewayId);
if (!groupResourceProfiles.isEmpty()) {
// Just pick the first one
- experiment.getUserConfigurationData().setGroupResourceProfileId(groupResourceProfiles.get(0).getGroupResourceProfileId());
+ final String groupResourceProfileId = groupResourceProfiles.get(0).getGroupResourceProfileId();
+ logger.warn("Experiment {} doesn't have groupResourceProfileId, picking first one user has access to: {}", airavataExperimentId, groupResourceProfileId);
+ experiment.getUserConfigurationData().setGroupResourceProfileId(groupResourceProfileId);
regClient.updateExperimentConfiguration(airavataExperimentId, experiment.getUserConfigurationData());
} else {
throw new AuthorizationException("User " + username + " in gateway " + gatewayId + " doesn't have access to any group resource profiles.");
--
To stop receiving notification emails like this one, please contact
machristie@apache.org.