airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject airavata-php-gateway git commit: AIRAVATA-2451 Redirect dashboard->login when not logged in
Date Mon, 26 Jun 2017 21:07:52 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 11aa84d6a -> 5a25574e3


AIRAVATA-2451 Redirect dashboard->login when not logged in


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

Branch: refs/heads/develop
Commit: 5a25574e3d875f890f1ed3bb9bf4c15ba9d6f088
Parents: 11aa84d
Author: Marcus Christie <machrist@iu.edu>
Authored: Mon Jun 26 17:05:50 2017 -0400
Committer: Marcus Christie <machrist@iu.edu>
Committed: Mon Jun 26 17:05:50 2017 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5a25574e/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 5f2fafe..edadcf7 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -307,6 +307,11 @@ class AccountController extends BaseController
 
     public function dashboard(){
 
+        // dashboard requires that the user is logged in, if not redirect to login
+        if (!CommonUtilities::id_in_session()) {
+            return Redirect::to("login");
+        }
+
         $userRoles = Session::get("roles");
         if (Session::has("user-profile")) {
             $userEmail = Session::get("user-profile")->emails[0];


Mime
View raw message