project owner always granted sharing when permissions are set (to ensure that even if something goes wrong on the client end, the owner can still access their project)
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/fe506210 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/fe506210 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/fe506210 Branch: refs/heads/develop Commit: fe506210fc317afb4cab24b18f119f78684688ba Parents: 39f9b23 Author: Jeff Kinnison <[email protected]> Authored: Tue Aug 16 10:17:21 2016 -0400 Committer: Jeff Kinnison <[email protected]> Committed: Tue Aug 16 10:17:21 2016 -0400 ---------------------------------------------------------------------- app/libraries/ProjectUtilities.php | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fe506210/app/libraries/ProjectUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php index 0437526..a5efdb4 100755 --- a/app/libraries/ProjectUtilities.php +++ b/app/libraries/ProjectUtilities.php @@ -305,6 +305,10 @@ class ProjectUtilities * @param $users A map of username => {read_permission, write_permission} */ private static function share_project($projectId, $users) { + $project = Airavata::getProject(Session::get("authz-token"), $projectId); + $users->{$project->owner}->read = true; + $users->{$project->owner}->write = true; + $wadd = array(); $wrevoke = array(); $ewrevoke = array();
