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/master
Commit: 5a6cba78b8b94e8c7533fe5bf24f40b55275ab2d
Parents: 428a884
Author: Nipurn Doshi <[email protected]>
Authored: Tue Feb 2 16:39:40 2016 -0500
Committer: Nipurn Doshi <[email protected]>
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);

Reply via email to