You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/08/17 15:32:57 UTC
[10/20] airavata-php-gateway git commit: Project summary page now
only load experiments that the user may access
Project summary page now only load experiments that the user may access
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/dcf8e479
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/dcf8e479
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/dcf8e479
Branch: refs/heads/develop
Commit: dcf8e479978e050c072aea251514dec538ea5911
Parents: 7b21101
Author: Jeff Kinnison <je...@gmail.com>
Authored: Tue Aug 16 09:56:18 2016 -0400
Committer: Jeff Kinnison <je...@gmail.com>
Committed: Tue Aug 16 09:56:18 2016 -0400
----------------------------------------------------------------------
app/libraries/ProjectUtilities.php | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dcf8e479/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index 476f94d..1e5fecc 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -184,6 +184,12 @@ class ProjectUtilities
CommonUtilities::print_error_message('TTransportException!<br><br>' . $tte->getMessage());
}
+ for($i = 0; $i < count($experiments); $i++) {
+ if (!SharingUtilities::userCanRead(Session::get("username"), $experiments[$i]->experimentId, ResourceType::EXPERIMENT)) {
+ array_splice($experiments, $i, 1);
+ }
+ }
+
return $experiments;
}