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/03/24 14:20:15 UTC

[1/2] airavata-php-gateway git commit: handling username '@' split differently

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/keycloak-integration dd00dd4a7 -> f55323c47


handling username '@' split differently


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

Branch: refs/heads/keycloak-integration
Commit: 1c6c44d56c187e30b275e4bf9f91556bb08fedee
Parents: 471b380
Author: scnakandala <su...@gmail.com>
Authored: Fri Mar 24 10:19:36 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Mar 24 10:19:36 2017 -0400

----------------------------------------------------------------------
 app/libraries/GrouperUtilities.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/1c6c44d5/app/libraries/GrouperUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/GrouperUtilities.php b/app/libraries/GrouperUtilities.php
index e73fdc3..62714f4 100644
--- a/app/libraries/GrouperUtilities.php
+++ b/app/libraries/GrouperUtilities.php
@@ -25,7 +25,7 @@ class GrouperUtilities
         foreach($userPermissionMap as $key=> $value){
             if (strpos($key, '@') !== false) {
                 $parts = explode('@', $key);
-                $key = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+                $key = join('@', array_slice($parts, 0, -1)) . "@" . Config::get('pga_config.airavata')['gateway-id'];
             }else{
                 $key = $key . "@" . Config::get('pga_config.airavata')['gateway-id'];
             }
@@ -45,7 +45,7 @@ class GrouperUtilities
         foreach($userPermissionMap as $key=> $value){
             if (strpos($key, '@') !== false) {
                 $parts = explode('@', $key);
-                $key = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+                $key = join('@', array_slice($parts, 0, -1)) . "@" . Config::get('pga_config.airavata')['gateway-id'];
             }else{
                 $key = $key . "@" . Config::get('pga_config.airavata')['gateway-id'];
             }
@@ -67,7 +67,7 @@ class GrouperUtilities
         foreach ($temp as $key => $u) {
             if (strpos($u, '@') !== false) {
                 $parts = explode('@', $u);
-                $u = $parts[0];
+                $u = $key = join('@', array_slice($parts, 0, -1));
             }
             $userList[] = $u;
         }
@@ -81,7 +81,7 @@ class GrouperUtilities
     public static function createGroup($group){
         if (strpos($group->ownerId, '@') !== false) {
             $parts = explode('@', $group->ownerId);
-            $group->ownerId = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+            $group->ownerId = join('@', array_slice($parts, 0, -1)) . "@" . Config::get('pga_config.airavata')['gateway-id'];
         }else{
             $group->ownerId = $group->ownerId . "@" . Config::get('pga_config.airavata')['gateway-id'];
         }
@@ -95,7 +95,7 @@ class GrouperUtilities
     public static function updateGroup($group){
         if (strpos($group->ownerId, '@') !== false) {
             $parts = explode('@', $group->ownerId);
-            $group->ownerId = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+            $group->ownerId = join('@', array_slice($parts, 0, -1)) . "@" . Config::get('pga_config.airavata')['gateway-id'];
         }else{
             $group->ownerId = $group->ownerId . "@" . Config::get('pga_config.airavata')['gateway-id'];
         }
@@ -110,7 +110,7 @@ class GrouperUtilities
     public static function deleteGroup($groupId, $ownerName){
         if (strpos($ownerName, '@') !== false) {
             $parts = explode('@', $ownerName);
-            $ownerName = $parts[0];
+            $ownerName = join('@', array_slice($parts, 0, -1));
         }
 
         Airavata::deleteGroup(Session::get('authz-token'), $groupId, $ownerName, Config::get('pga_config.airavata')['gateway-id']);
@@ -131,7 +131,7 @@ class GrouperUtilities
     public static function getAllGroupsUserBelongs($userName){
         if (strpos($userName, '@') !== false) {
             $parts = explode('@', $userName);
-            $userName = $parts[0];
+            $userName = join('@', array_slice($parts, 0, -1));
         }
 
         return Airavata::getAllGroupsUserBelongs(Session::get('authz-token'), $userName,


[2/2] airavata-php-gateway git commit: merging the remote branch

Posted by sc...@apache.org.
merging the remote branch


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

Branch: refs/heads/keycloak-integration
Commit: f55323c47dfc4f2838a54e9114e5a802d051fc0a
Parents: 1c6c44d dd00dd4
Author: scnakandala <su...@gmail.com>
Authored: Fri Mar 24 10:20:12 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Mar 24 10:20:12 2017 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php     |  9 +++--
 app/controllers/AdminController.php       |  7 ++--
 app/libraries/Keycloak/API/RoleMapper.php | 54 +++++++++++++++++++++-----
 app/libraries/Keycloak/API/Users.php      | 30 +++++++++++++-
 app/libraries/Keycloak/Keycloak.php       | 25 +++++++++++-
 app/libraries/SharingUtilities.php        |  2 +-
 6 files changed, 107 insertions(+), 20 deletions(-)
----------------------------------------------------------------------