airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [2/3] airavata-php-gateway git commit: Bug Fix
Date Tue, 02 Feb 2016 21:41:46 GMT
Bug Fix


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

Branch: refs/heads/develop
Commit: 5a6cba78b8b94e8c7533fe5bf24f40b55275ab2d
Parents: 428a884
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue Feb 2 16:39:40 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Tue Feb 2 16:39:40 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5a6cba78/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 342db4a..704aefb 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -80,17 +80,17 @@ class ExperimentController extends BaseController
     public function summary()
     {
         $experiment = ExperimentUtilities::get_experiment($_GET['expId']);
-
-        //viewing experiments of other gateways is not allowed if user is not super admin
-        if( $experiment->gatewayId != Session::get("gateway_id") && !Session::has("super-admin"))
-            return CommonUtilities::print_error_message('It seems that you do not have permissions
to view this experiment or it belongs to another gateway.');
-        
         if(isset($_GET['isAutoRefresh']) && $_GET['isAutoRefresh'] == 'true'){
             $autoRefresh = true;
         }else{
             $autoRefresh = false;
         }
         if ($experiment != null) {
+
+            //viewing experiments of other gateways is not allowed if user is not super admin
+            if( $experiment->gatewayId != Session::get("gateway_id") && !Session::has("super-admin"))
+                CommonUtilities::print_error_message('It seems that you do not have permissions
to view this experiment or it belongs to another gateway.');
+        
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
             $jobDetails = ExperimentUtilities::get_job_details($experiment->experimentId);


Mime
View raw message