From 180a77fe27294ba9a61a8cbc134c222df51438e3 Mon Sep 17 00:00:00 2001 From: Axel Stohn Date: Sun, 13 Mar 2022 08:05:18 -0700 Subject: [PATCH] clean up --- Lib/GrouperApiAccess.php | 14 +++++++++-- Model/GrouperGroup.php | 18 +++++++++++++- PlantUML/GroupsBelongTo.puml | 48 ++++++++++++++++++------------------ 3 files changed, 53 insertions(+), 27 deletions(-) diff --git a/Lib/GrouperApiAccess.php b/Lib/GrouperApiAccess.php index f336b95..60b2969 100644 --- a/Lib/GrouperApiAccess.php +++ b/Lib/GrouperApiAccess.php @@ -188,7 +188,7 @@ public function getOptionalGroups(array $queryData) { } /** - * Gets all groups in Grouper where user is an admin/owner + * Gets all groups in Grouper where user is an admin/owner or has update privs * * @param array $queryData Array of conditions for querying * @return array Array of groups from Grouper @@ -297,6 +297,10 @@ public function getMembersInGroup(array $queryData) { } /** + * ======================== NOT BEING USED ======================== + * + * Potential use was for creating adhoc group by a user, not associated to WG. + * * Gets all Stems/Folders where User is admin/owner * * @param array $queryData Array of conditions for querying @@ -460,6 +464,8 @@ public function createGroupWithTemplate(array $queryData) { } /** + * ======================== NOT BEING USED ======================== + * * Method used to DELETE a Group in Grouper via the Template method. * * @param array $queryData Array of conditions and data adding new Grouper Group @@ -511,6 +517,8 @@ public function deleteGroupWithTemplate(array $queryData) { } /** + * ======================== NOT BEING USED ======================== + * * For creating/updating Ad-Hoc groups not using the Grouper Template format * * Create or Update a Group where User is Admin/Owner @@ -520,7 +528,6 @@ public function deleteGroupWithTemplate(array $queryData) { * @throws GrouperLiteException */ public function createUpdateGroup(array $queryData) { - //TODO Currently only supporting create group, need to test if update a group will work! $groupName = htmlentities($queryData['name']); $stemName = htmlentities($queryData['stem']); @@ -573,6 +580,9 @@ public function createUpdateGroup(array $queryData) { } /** + * ======================== NOT BEING USED ======================== + * Used to be used for Grouper group info page. + * * Grouper Group information plus a listing of attributes in Grouper for that given Group * * @param array $queryData Array of conditions for querying diff --git a/Model/GrouperGroup.php b/Model/GrouperGroup.php index 86a4aa0..4709064 100644 --- a/Model/GrouperGroup.php +++ b/Model/GrouperGroup.php @@ -205,6 +205,10 @@ private function memberOfGroups(array $conditions) { } /** + * ======================== NOT BEING USED ======================== + * + * Used to be used for Grouper group information page. leaving in case want to reincorporate. + * * Gets the Grouper Groups params and values as well as its associated attributes. * * @param string $groupName Name of Group, do not confuse with DisplayName field! @@ -341,6 +345,8 @@ public function membersInGroup(array $conditions, string $userId) { } /** + * ======================== NOT BEING USED ======================== + * * List of Email Groups a user can opt into. * * @param array $conditions Listing of conditions for display of records, including UserId @@ -507,6 +513,8 @@ private function resetUserOwner() { } /** + * ======================== NOT BEING USED ======================== + * * Delete a Grouper Group using the Template methodology in Grouper * * @param string $userId Id of User @@ -536,7 +544,9 @@ public function deleteGroupWithTemplate(string $userId, array $groupData) { } /** - * Creates/Updates a new Grouper Group not Template related + * ======================== NOT BEING USED ======================== + * + * Creates/Updates a new Grouper Group not WG Template related * * @param string $userId Id of user * @param array $data Data from form to Save in Grouper as a Group @@ -563,6 +573,8 @@ public function createUpdateGroup(string $userId, array $data) { } /** + * ======================== NOT BEING USED ======================== + * * Get Grouper Stems where User has authority to create a Grouper Group * * @param string $userId Id of User @@ -661,6 +673,10 @@ public function paginate($conditions) { } /** + * ======================== NOT BEING USED ======================== + * + * This is specifically for email listings only tabs/pages, that are now not being used. + * * Process that parses the email list and makes it more user friendly * @lists. * diff --git a/PlantUML/GroupsBelongTo.puml b/PlantUML/GroupsBelongTo.puml index c81241a..b8c4fc9 100644 --- a/PlantUML/GroupsBelongTo.puml +++ b/PlantUML/GroupsBelongTo.puml @@ -17,14 +17,14 @@ "displayName": "app:confluence:Axel Working Group:admins", "description": "Admins of confluence space for working group. Axel's working group for testing", "displayExtension": "admins", - "name": "app:confluence:AxelWorkingGroup:admins" + "name": "app:confluence:ExampleWGName:admins" }, { "extension": "users", "displayName": "app:confluence:Axel Working Group:users", "description": "Users of confluence space for working group. Axel's working group for testing", "displayExtension": "users", - "name": "app:confluence:AxelWorkingGroup:users" + "name": "app:confluence:ExampleWGName:users" }, { "extension": "admins", @@ -35,17 +35,17 @@ }, { "extension": "admins", - "displayName": "app:jira:AxelWorkingGroup:admins", + "displayName": "app:jira:ExampleWGName:admins", "description": "Users of jira project for working group. Axel's working group for testing", "displayExtension": "admins", - "name": "app:jira:AxelWorkingGroup:admins" + "name": "app:jira:ExampleWGName:admins" }, { "extension": "users", - "displayName": "app:jira:AxelWorkingGroup:users", + "displayName": "app:jira:ExampleWGName:users", "description": "Subscribers list receives working group emails. Axel's working group for testing", "displayExtension": "users", - "name": "app:jira:AxelWorkingGroup:users" + "name": "app:jira:ExampleWGName:users" }, { "extension": "admins", @@ -56,17 +56,17 @@ }, { "extension": "owners", - "displayName": "app:sympa:internet2:AxelWorkingGroup:owners", + "displayName": "app:sympa:internet2:ExampleWGName:owners", "description": "Owners list manages the email list for the working group. Axel's working group for testing", "displayExtension": "owners", - "name": "app:sympa:internet2:AxelWorkingGroup:owners" + "name": "app:sympa:internet2:ExampleWGName:owners" }, { "extension": "subscribers", - "displayName": "app:sympa:internet2:AxelWorkingGroup:subscribers", + "displayName": "app:sympa:internet2:ExampleWGName:subscribers", "description": "Subscribers list receives working group emails. Axel's working group for testing", "displayExtension": "subscribers", - "name": "app:sympa:internet2:AxelWorkingGroup:subscribers" + "name": "app:sympa:internet2:ExampleWGName:subscribers" }, { "extension": "owners", @@ -91,17 +91,17 @@ }, { "extension": "admins", - "displayName": "ref:InCommon-collab:AxelWorkingGroup:AxelWorkingGroup admins", + "displayName": "ref:InCommon-collab:ExampleWGName:ExampleWGName admins", "description": "Admins role means can manage / attest the working group. Axel's working group for testing", - "displayExtension": "AxelWorkingGroup admins", - "name": "ref:incommon-collab:AxelWorkingGroup:admins" + "displayExtension": "ExampleWGName admins", + "name": "ref:incommon-collab:ExampleWGName:admins" }, { "extension": "users", - "displayName": "ref:InCommon-collab:AxelWorkingGroup:AxelWorkingGroup users", + "displayName": "ref:InCommon-collab:ExampleWGName:ExampleWGName users", "description": "Users role means members of the working group with access to collaboration tools. Axel's working group for testing", - "displayExtension": "AxelWorkingGroup users", - "name": "ref:incommon-collab:AxelWorkingGroup:users" + "displayExtension": "ExampleWGName users", + "name": "ref:incommon-collab:ExampleWGName:users" }, { "extension": "admins", @@ -143,7 +143,7 @@ start * "ref:InCommon-collab"; partition "For Each Group" { -if (Does "app:jira:AxelWorkingGroup:users" start with any **Working Group Stem**?) then (yes) +if (Does "app:jira:ExampleWGName:users" start with any **Working Group Stem**?) then (yes) :Hold as part of a Working Group; else (no) :Next record"; @@ -180,29 +180,29 @@ fork again "displayName": "app:confluence:Axel Working Group:users", "description": "Users of confluence space for working group." "displayExtension": "users", - "name": "app:confluence:AxelWorkingGroup:users" + "name": "app:confluence:ExampleWGName:users" }; fork again :Group 3 { "extension": "admins", - "displayName": "app:jira:AxelWorkingGroup:admins", + "displayName": "app:jira:ExampleWGName:admins", "description": "Users of jira project for working group." "displayExtension": "admins", - "name": "app:jira:AxelWorkingGroup:admins" + "name": "app:jira:ExampleWGName:admins" }; end fork partition "Compare Each Group to see if same Working Group" { :Compare Group 1 and Group 2 **Group 1 name** = "app:confluence:BillWorkingGroup:admins" -**Group 2 name** = "app:confluence:AxelWorkingGroup:users"; +**Group 2 name** = "app:confluence:ExampleWGName:users"; :Assumption = Last section of name value is **ALWAYS** Members (users, admins) , therefore second to last section is Working Group Name; -if (Does "BillWorkingGroup" == "AxelWorkingGroup"?) then (yes) +if (Does "BillWorkingGroup" == "ExampleWGName"?) then (yes) :Save to BillWorkingGroup; endif :Compare Group 2 and Group 3; -if (Does "AxelWorkingGroup" == "AxelWorkingGroup"?) then (yes) - :Save to AxelWorkingGroup; +if (Does "ExampleWGName" == "ExampleWGName"?) then (yes) + :Save to ExampleWGName; endif } stop