Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
scnakandala committed Jun 28, 2017
1 parent 0afc120 commit 78adc90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/AccountController.php
Expand Up @@ -170,7 +170,7 @@ public function loginSubmit()
Session::put("gateway_id", Config::get('pga_config.airavata')['gateway-id']);

if(Session::has("admin") || Session::has("admin-read-only") || Session::has("authorized-user")){
return $this->initializeWithAiravata($username, $userEmail, $firstName, $lastName);
return $this->initializeWithAiravata($username, $userEmail, $firstName, $lastName, $accessToken);
}

if(Session::has("admin") || Session::has("admin-read-only")){
Expand Down Expand Up @@ -259,7 +259,7 @@ private function hasAnyRoles($roles) {
or in_array(Config::get('pga_config.wsis')['user-role-name'], $roles)
or in_array(Config::get('pga_config.wsis')['initial-role-name'], $roles);
}
private function initializeWithAiravata($username, $userEmail, $firstName, $lastName){
private function initializeWithAiravata($username, $userEmail, $firstName, $lastName, $accessToken){

// Log the user out if Airavata is down. If a new user we want to make
// sure we create the default project and setup experiment storage
Expand Down Expand Up @@ -291,9 +291,9 @@ private function initializeWithAiravata($username, $userEmail, $firstName, $last
Session::put('user-profile', $userProfile);

if(Session::has("admin") || Session::has("admin-read-only")){
return Redirect::to("admin/dashboard");
return Redirect::route("admin/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}else{
return Redirect::to("account/dashboard");
return Redirect::route("account/dashboard", array('status'=>'ok', 'code'=>$accessToken));
}
}

Expand Down

0 comments on commit 78adc90

Please sign in to comment.