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 2017/06/15 16:20:25 UTC

[6/7] airavata git commit: AIRAVATA-2438 Lower case user profile user id/internal id

AIRAVATA-2438 Lower case user profile user id/internal id


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

Branch: refs/heads/develop
Commit: 35c7cdf674470879e957cb7a098de9d2da943f84
Parents: 2b7a9a3
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Jun 14 17:12:19 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Thu Jun 15 12:19:55 2017 -0400

----------------------------------------------------------------------
 .../service/profile/handlers/UserProfileServiceHandler.java       | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/35c7cdf6/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
index 7d85002..f27d580 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
@@ -59,6 +59,9 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     @SecurityCheck
     public String addUserProfile(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException, AuthorizationException, TException {
         try{
+            // Lowercase user id and internal id
+            userProfile.setUserId(userProfile.getUserId().toLowerCase());
+            userProfile.setAiravataInternalUserId(userProfile.getUserId() + "@" + userProfile.getGatewayId());
             userProfile = userProfileRepository.updateUserProfile(userProfile, getIAMUserProfileUpdater(authzToken, userProfile));
             if (null != userProfile) {
                 logger.info("Added UserProfile with userId: " + userProfile.getUserId());