AIRAVATA-2190 Check data-sharing-enabled flag
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/35a9e8e5 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/35a9e8e5 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/35a9e8e5 Branch: refs/heads/develop Commit: 35a9e8e50ecc427e88bf121d5ec42615bea18448 Parents: 81f3b13 Author: Marcus Christie <[email protected]> Authored: Fri Nov 4 13:04:27 2016 -0400 Committer: Marcus Christie <[email protected]> Committed: Fri Nov 4 13:04:27 2016 -0400 ---------------------------------------------------------------------- app/controllers/ExperimentController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/35a9e8e5/app/controllers/ExperimentController.php ---------------------------------------------------------------------- diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php index 004b27d..aab0ae9 100755 --- a/app/controllers/ExperimentController.php +++ b/app/controllers/ExperimentController.php @@ -124,7 +124,11 @@ class ExperimentController extends BaseController $project = null; - if (SharingUtilities::userCanRead(Session::get("username"), $experiment->projectId, ResourceType::PROJECT)) { + if(Config::get('pga_config.airavata')["data-sharing-enabled"]){ + if (SharingUtilities::userCanRead(Session::get("username"), $experiment->projectId, ResourceType::PROJECT)) { + $project = ProjectUtilities::get_project($experiment->projectId); + } + } else { $project = ProjectUtilities::get_project($experiment->projectId); } $expVal = ExperimentUtilities::get_experiment_values($experiment);
