You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2017/04/05 19:11:07 UTC

[43/50] [abbrv] airavata git commit: Send authztoken to userprofile-service methods within AiravataServerHandler

Send authztoken to userprofile-service methods within AiravataServerHandler


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

Branch: refs/heads/develop
Commit: 5bbecff37269ae5d0bb93f4602c89a5c86c465e3
Parents: 52dd9bb
Author: Gourav Shenoy <sh...@gmail.com>
Authored: Wed Apr 5 12:05:18 2017 -0400
Committer: Gourav Shenoy <sh...@gmail.com>
Committed: Wed Apr 5 12:05:18 2017 -0400

----------------------------------------------------------------------
 .../api/server/handler/AiravataServerHandler.java     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5bbecff3/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 0cc4013..a5ba4f0 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
@@ -4780,7 +4780,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throw new AuthorizationException("User isn't authorized to add user profile for this user and/or gateway");
         }
         try {
-            return getUserProfileServiceClient().addUserProfile(userProfile);
+            return getUserProfileServiceClient().addUserProfile(authzToken, userProfile);
         } catch (Exception e) {
             String msg = "Error adding user profile";
             logger.error(msg, e);
@@ -4802,7 +4802,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throw new AuthorizationException("User isn't authorized to update user profile for this user and/or gateway");
         }
         try {
-            return getUserProfileServiceClient().updateUserProfile(userProfile);
+            return getUserProfileServiceClient().updateUserProfile(authzToken, userProfile);
         } catch (Exception e) {
             String msg = "Error updating user profile";
             logger.error(msg, e);
@@ -4818,7 +4818,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
 
         try {
-            return getUserProfileServiceClient().getUserProfileById(userId, gatewayId);
+            return getUserProfileServiceClient().getUserProfileById(authzToken, userId, gatewayId);
         } catch (Exception e) {
             String msg = MessageFormat.format("Error getting user profile for [{0}] in [{1}]", userId, gatewayId);
             logger.error(msg, e);
@@ -4839,7 +4839,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throw new AuthorizationException("User isn't authorized to delete user profile for this user");
         }
         try {
-            return getUserProfileServiceClient().deleteUserProfile(userId, null);
+            return getUserProfileServiceClient().deleteUserProfile(authzToken, userId, null);
         } catch (Exception e) {
             String msg = "Error deleting user profile";
             logger.error(msg, e);
@@ -4855,7 +4855,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
 
         try {
-            return getUserProfileServiceClient().getAllUserProfilesInGateway(gatewayId, offset, limit);
+            return getUserProfileServiceClient().getAllUserProfilesInGateway(authzToken, gatewayId, offset, limit);
         } catch (Exception e) {
             String msg = MessageFormat.format("Error getting all user profiles for [{0}] with offset={1} and limit={2}", gatewayId, offset, limit);
             logger.error(msg, e);
@@ -4871,7 +4871,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
 
         try {
-            return getUserProfileServiceClient().getUserProfileByName(userName, gatewayId);
+            return getUserProfileServiceClient().getUserProfileByName(authzToken, userName, gatewayId);
         } catch (Exception e) {
             String msg = MessageFormat.format("Error getting user profile for [{0}] in [{1}]", userName, gatewayId);
             logger.error(msg, e);
@@ -4887,7 +4887,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
 
         try {
-            return getUserProfileServiceClient().doesUserExist(userName, gatewayId);
+            return getUserProfileServiceClient().doesUserExist(authzToken, userName, gatewayId);
         } catch (Exception e) {
             String msg = MessageFormat.format("Error checking if user profile exists for [{0}] in [{1}]", userName, gatewayId);
             logger.error(msg, e);