You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/04/27 19:38:28 UTC
airavata-php-gateway git commit: Only set sharing on default project
when sharing enabled
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master 69dba346f -> 5d1d82c7a
Only set sharing on default project when sharing enabled
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/5d1d82c7
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/5d1d82c7
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/5d1d82c7
Branch: refs/heads/master
Commit: 5d1d82c7af393f2da51672a6d96779e245f21467
Parents: 69dba34
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Apr 27 15:36:04 2017 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Apr 27 15:36:59 2017 -0400
----------------------------------------------------------------------
app/libraries/ProjectUtilities.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5d1d82c7/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index b7f7dd9..3367d16 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -180,11 +180,13 @@ class ProjectUtilities
try {
$projectId = Airavata::createProject(Session::get('authz-token'), Config::get('pga_config.airavata')['gateway-id'], $project);
- $share = new stdClass();
- $share->{$username} = new stdClass();
- $share->{$username}->read = true;
- $share->{$username}->write = true;
- ProjectUtilities::share_project($projectId, $share);
+ if (Config::get('pga_config.airavata')["data-sharing-enabled"]){
+ $share = new stdClass();
+ $share->{$username} = new stdClass();
+ $share->{$username}->read = true;
+ $share->{$username}->write = true;
+ ProjectUtilities::share_project($projectId, $share);
+ }
} catch (InvalidRequestException $ire) {
CommonUtilities::print_error_message('InvalidRequestException!<br><br>' . $ire->getMessage());