diff --git a/Lib/GrouperApiAccess.php b/Lib/GrouperApiAccess.php index 3c38b87..091e994 100644 --- a/Lib/GrouperApiAccess.php +++ b/Lib/GrouperApiAccess.php @@ -303,15 +303,30 @@ private function useMembershipUrl(array $queryData) { throw new GrouperLiteException("Option of $groupType is not supported"); } - //Build request logic - $groupsToShow = array( - "WsRestGetMembershipsRequest" => array( - "fieldName" => $fieldName, - "wsSubjectLookups" => array( - array("subjectId" => $subjectId) + if ($groupType == 'Optins' || $groupType == 'Optouts') { + //Build request logic, 2 subjectId's, second is for when user in "Secret" Optin/Optout Group + $groupsToShow = array( + "WsRestGetMembershipsRequest" => array( + "fieldName" => $fieldName, + "wsSubjectLookups" => array( + array("subjectId" => $subjectId), + array("subjectId" => $userId) + ) ) - ) - ); + ); + } else { + //Build request logic + $groupsToShow = array( + "WsRestGetMembershipsRequest" => array( + "fieldName" => $fieldName, + "wsSubjectLookups" => array( + array("subjectId" => $subjectId) + ) + ) + ); + } + + $this->http->setHeader(array('Content-Type' => 'application/json', 'Accept' => 'application/json')); $connectionUrl = "{$this->config['fullUrl']}/memberships"; diff --git a/Lib/lang.php b/Lib/lang.php index 4bbb94e..e466bb1 100644 --- a/Lib/lang.php +++ b/Lib/lang.php @@ -84,7 +84,7 @@ 'pl.grouperlite.value.enabled' => 'Enabled', 'pl.grouperlite.value.disabled' => 'Disabled', - 'pl.grouperlite.value.sympa - internet2' => 'A collection of email addresses to be used by the members of the group for communication purposes.', + 'pl.grouperlite.value.email' => 'Email address of Working Group List', 'pl.grouperlite.value.jira' => 'For this Group, Jira provides a place to plan, track, and manage your agile and software development projects.', 'pl.grouperlite.value.confluence' => 'The Confluence group is a team workspace, specifically for this Group, where knowledge and collaboration meet allowing for the ability to Create, collaborate, and organize content in one place.', 'pl.grouperlite.value.incommon-collab' => '', diff --git a/Model/GrouperGroup.php b/Model/GrouperGroup.php index bc5246c..2d7b0d9 100644 --- a/Model/GrouperGroup.php +++ b/Model/GrouperGroup.php @@ -227,6 +227,15 @@ private function getFriendlyWorkingGroupName(array $groups) { } $appCount += 1; } + //changed the way email list are displayed to actually show lists email address. + if ($appName == 'sympa - internet2' || $appName == 'sympa - incommon'){ + if ($appName == 'sympa - internet2'){ + $appName = $group['WGName'] . '@lists.' . 'internet2.edu'; + } else { + $appName = $group['WGName'] . '@lists.' . 'incommon.org'; + } + + } $group['WGApp'] = $appName; //TODO - FOR DEMO PURPOSE THAT LEAVES OUT ADMIN GROUPS TO SHOW WHAT AVERAGE USER SEES if ($group['WGRole'] !== 'admins' && $group['WGRole'] !== 'owners') { diff --git a/View/GrouperGroups/groupmember.ctp b/View/GrouperGroups/groupmember.ctp index c5a83f0..32363bd 100644 --- a/View/GrouperGroups/groupmember.ctp +++ b/View/GrouperGroups/groupmember.ctp @@ -101,10 +101,14 @@ $numColumns = count($columns); ) ?>" title=""> - +