airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata-php-gateway git commit: rolling back to previous version
Date Thu, 28 Jul 2016 20:11:41 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 1709b7895 -> 349ccc6bb


rolling back to previous version


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/e8bc9467
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/e8bc9467
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/e8bc9467

Branch: refs/heads/develop
Commit: e8bc946729041cf8573b28e5180b05be9ffa1f51
Parents: 93005a5
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Jul 28 16:11:32 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Jul 28 16:11:32 2016 -0400

----------------------------------------------------------------------
 app/libraries/Wsis/Wsis.php | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e8bc9467/app/libraries/Wsis/Wsis.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php
index 042a9af..1f5b406 100755
--- a/app/libraries/Wsis/Wsis.php
+++ b/app/libraries/Wsis/Wsis.php
@@ -212,23 +212,8 @@ class Wsis {
      */
     public function getUserProfileFromOAuthToken($token){
         $userProfile = $this->oauthManger->getUserProfile($token);
-
-        //FIXME - Hacky way to fix CILogon JIT provisioning in IS
-        $userName = $userProfile->sub;
-        if(!isset($userProfile->roles)){
-            if(substr( $userName, 0, 7 ) === "http://"){
-                $temp = substr($userName, 6);
-            }else{
-                $temp = $userName;
-            }
-            $roles = $this->getUserRoles($temp);
-        }else{
-            $roles = $userProfile->roles;
-        }
-        if(!is_array($roles))
-            $roles = explode(",", $roles);
-        return array('username'=>$userName, 'email'=>$userProfile->email, 'firstname'=>$userProfile->given_name,
-            'lastname'=>$userProfile->family_name, 'roles'=>$roles);
+        return array('username'=>$userProfile->sub, 'email'=>$userProfile->email,
'firstname'=>$userProfile->given_name,
+            'lastname'=>$userProfile->family_name, 'roles'=>explode(",",$userProfile->roles));
     }
 
     /**


Mime
View raw message