Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Stohn authored and Axel Stohn committed Mar 13, 2022
1 parent 8f25ede commit 180a77f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 27 deletions.
14 changes: 12 additions & 2 deletions Lib/GrouperApiAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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']);
Expand Down Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion Model/GrouperGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
* <nameofgroup>@lists.<sympastem>
*
Expand Down
48 changes: 24 additions & 24 deletions PlantUML/GroupsBelongTo.puml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 180a77f

Please sign in to comment.