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/07/13 16:36:56 UTC
[06/10] airavata-php-gateway git commit: merge with upstream
merge with upstream
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/df8f8bc3
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/df8f8bc3
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/df8f8bc3
Branch: refs/heads/grouper-integration
Commit: df8f8bc37618a75cbbed71354d7dd72450cab212
Parents: 067e41d 3d00137
Author: Jeff Kinnison <je...@gmail.com>
Authored: Tue Jul 12 16:00:55 2016 -0400
Committer: Jeff Kinnison <je...@gmail.com>
Committed: Tue Jul 12 16:00:55 2016 -0400
----------------------------------------------------------------------
app/libraries/Airavata/API/Airavata.php | 14410 +++++++++++---------
app/libraries/Airavata/Model/Group/Types.php | 193 +
app/libraries/GrouperUtilities.php | 64 +
3 files changed, 8401 insertions(+), 6266 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/df8f8bc3/app/libraries/GrouperUtilities.php
----------------------------------------------------------------------
diff --cc app/libraries/GrouperUtilities.php
index e156e4b,a9e0b69..e73fdc3
--- a/app/libraries/GrouperUtilities.php
+++ b/app/libraries/GrouperUtilities.php
@@@ -74,4 -74,68 +74,68 @@@ class GrouperUtilitie
return $userList;
}
+
+ /**
+ * @param $group Airavata/Model/Group/GrouoModel
+ */
+ public static function createGroup($group){
+ if (strpos($group->ownerId, '@') !== false) {
+ $parts = explode('@', $group->ownerId);
+ $group->ownerId = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+ }else{
+ $group->ownerId = $group->ownerId . "@" . Config::get('pga_config.airavata')['gateway-id'];
+ }
+ Airavata::createGroup(Session::get('authz-token'),$group);
+ }
+
+
+ /**
+ * @param $group Airavata/Model/Group/GrouoModel
+ */
+ public static function updateGroup($group){
+ if (strpos($group->ownerId, '@') !== false) {
+ $parts = explode('@', $group->ownerId);
+ $group->ownerId = $parts[0] . "@" . Config::get('pga_config.airavata')['gateway-id'];
+ }else{
+ $group->ownerId = $group->ownerId . "@" . Config::get('pga_config.airavata')['gateway-id'];
+ }
+ Airavata::updateGroup(Session::get('authz-token'),$group);
+ }
+
+
+ /**
+ * @param $groupId
+ * @param $ownerName
+ */
+ public static function deleteGroup($groupId, $ownerName){
+ if (strpos($ownerName, '@') !== false) {
+ $parts = explode('@', $ownerName);
+ $ownerName = $parts[0];
+ }
+
+ Airavata::deleteGroup(Session::get('authz-token'), $groupId, $ownerName, Config::get('pga_config.airavata')['gateway-id']);
+ }
+
+ /**
+ * @param $groupId
+ */
+ public static function getGroup($groupId){
+ return Airavata::getGroup(Session::get('authz-token'),$groupId);
+ }
+
+
+ /**
+ * @param $userName
+ * @return mixed
+ */
+ public static function getAllGroupsUserBelongs($userName){
+ if (strpos($userName, '@') !== false) {
+ $parts = explode('@', $userName);
+ $userName = $parts[0];
+ }
+
+ return Airavata::getAllGroupsUserBelongs(Session::get('authz-token'), $userName,
+ Config::get('pga_config.airavata')['gateway-id']);
+ }
+
-}
+}