airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [3/4] airavata-php-gateway git commit: Getting new user redirects back.
Date Wed, 16 Mar 2016 15:16:12 GMT
Getting new user redirects back.


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

Branch: refs/heads/develop
Commit: 03af210df59b14c84c23079b788718becceb3f82
Parents: 4ea219d
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Wed Mar 16 11:12:16 2016 -0400
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Wed Mar 16 11:12:16 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/03af210d/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 199c773..523ab7d 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -124,8 +124,7 @@ class AccountController extends BaseController
             $userProfile = WSIS::getUserProfileFromOAuthToken($accessToken);
             $username = $userProfile['username'];
             $userRoles = (array)WSIS::getUserRoles($username);
-
-            print_r( $userRoles);
+            
             $authzToken = new Airavata\Model\Security\AuthzToken();
             $authzToken->accessToken = $accessToken;
             $authzToken->claimsMap = array('userName'=>$username);
@@ -133,6 +132,7 @@ class AccountController extends BaseController
             Session::put('oauth-refresh-code',$refreshToken);
             Session::put('oauth-expiration-time',$expirationTime);
             Session::put("user-profile", $userProfile);
+
             if (in_array(Config::get('pga_config.wsis')['admin-role-name'], $userRoles))
{
                 Session::put("admin", true);
             }
@@ -158,7 +158,7 @@ class AccountController extends BaseController
             if(Session::get("admin") || Session::get("admin-read-only")){
                 return Redirect::to("admin/dashboard");
             }else{
-                return Redirect::to("home");
+                return Redirect::to("account/dashboard");
             }
         }
 
@@ -281,6 +281,10 @@ class AccountController extends BaseController
         }
     }
 
+    public function dashboard(){
+       return View::make("account/dashboard");
+    }
+
     public function resetPassword()
     {
         $confirmation = Input::get("confirmation");


Mime
View raw message