airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [5/7] airavata-php-gateway git commit: enabled clone experiment permissions transfer
Date Thu, 14 Jul 2016 21:50:31 GMT
enabled clone experiment permissions transfer


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

Branch: refs/heads/grouper-integration
Commit: 0d8db5d6a467c1b975abd90abae8f8198acfbcff
Parents: 8f4fd5f
Author: Jeff Kinnison <jeffdkinnison@gmail.com>
Authored: Thu Jul 14 16:48:22 2016 -0400
Committer: Jeff Kinnison <jeffdkinnison@gmail.com>
Committed: Thu Jul 14 16:48:22 2016 -0400

----------------------------------------------------------------------
 app/controllers/ExperimentController.php | 2 --
 app/libraries/ExperimentUtilities.php    | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0d8db5d6/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 57538c2..28be5e5 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -244,9 +244,7 @@ class ExperimentController extends BaseController
     public function cloneExperiment()
     {
         if (isset($_GET['expId'])) {
-            $users = getAllUserPermissions($_GET['expId'], ResourceType::EXPERIMENT);
             $cloneId = ExperimentUtilities::clone_experiment($_GET['expId']);
-            ExperimentUtilities::share_experiment($cloneId, $users);
             $experiment = ExperimentUtilities::get_experiment($cloneId);
             $project = ProjectUtilities::get_project($experiment->projectId);
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0d8db5d6/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index cc59b68..9f46fee 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -632,6 +632,10 @@ class ExperimentUtilities
             }
             $experiment->userConfigurationData->experimentDataDir = ExperimentUtilities::$experimentPath;
             Airavata::updateExperiment(Session::get('authz-token'), $cloneId, $experiment);
+
+            $share = json_encode(SharingUtilities::getAllUserPermissions($expId, ResourceType::EXPERIMENT));
+            ExperimentUtilities::share_experiment($cloneId, json_decode($share));
+
             return $cloneId;
         } catch (InvalidRequestException $ire) {
             CommonUtilities::print_error_message('<p>There was a problem cloning the
experiment.


Mime
View raw message