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:58 UTC

[11/20] airavata-php-gateway git commit: Default Project owner granted read and write permissions at creation

Default Project owner granted read and write permissions at creation


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

Branch: refs/heads/develop
Commit: 39f9b23ca22082888be0fa6601ba9399684173f2
Parents: dcf8e47
Author: Jeff Kinnison <je...@gmail.com>
Authored: Tue Aug 16 10:06:07 2016 -0400
Committer: Jeff Kinnison <je...@gmail.com>
Committed: Tue Aug 16 10:06:07 2016 -0400

----------------------------------------------------------------------
 app/libraries/ProjectUtilities.php | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/39f9b23c/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index 1e5fecc..0437526 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -150,6 +150,12 @@ 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);
+
         } catch (InvalidRequestException $ire) {
             CommonUtilities::print_error_message('InvalidRequestException!<br><br>' . $ire->getMessage());
         } catch (AiravataClientException $ace) {