Index: messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/ui/UIPermissionsManagerImpl.java =================================================================== --- messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/ui/UIPermissionsManagerImpl.java (revision 131412) +++ messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/ui/UIPermissionsManagerImpl.java (revision 131413) @@ -918,12 +918,7 @@ userMemberships.add(currRole); // now, add any groups the user is a member of try { - Collection groups; - if (ThreadLocalManager.get("message_center_current_member_groups") != null) { - groups = (Collection) ThreadLocalManager.get("message_center_current_member_groups"); - } else { - groups = SiteService.getSite(toolManager.getCurrentPlacement().getContext()).getGroupsWithMember(getCurrentUserId()); - } + Collection groups = SiteService.getSite(toolManager.getCurrentPlacement().getContext()).getGroupsWithMember(getCurrentUserId()); Iterator groupIter = groups.iterator(); while (groupIter.hasNext()) @@ -1025,7 +1020,16 @@ // for group awareness try { - Collection groups = (Collection) ThreadLocalManager.get("message_center_current_member_groups"); + Collection groups = null; + try + { + Site currentSite = SiteService.getSite(getContextId()); + groups = currentSite.getGroupsWithMember(getCurrentUserId()); + } + catch(IdUnusedException iue) + { + iue.printStackTrace(); + } if(groups != null) { for (Iterator groupIterator = groups.iterator(); groupIterator.hasNext();) @@ -1120,7 +1124,16 @@ // for group awareness try { - Collection groups = (Collection) ThreadLocalManager.get("message_center_current_member_groups"); + Collection groups = null; + try + { + Site currentSite = SiteService.getSite(getContextId()); + groups = currentSite.getGroupsWithMember(getCurrentUserId()); + } + catch(IdUnusedException iue) + { + iue.printStackTrace(); + } if(groups != null) { for (Iterator groupIterator = groups.iterator(); groupIterator.hasNext();) @@ -1225,7 +1238,16 @@ //for group awareness try { - Collection groups = (Collection) ThreadLocalManager.get("message_center_current_member_groups"); + Collection groups = null; + try + { + Site currentSite = SiteService.getSite(getContextId()); + groups = currentSite.getGroupsWithMember(getCurrentUserId()); + } + catch(IdUnusedException iue) + { + iue.printStackTrace(); + } if(groups != null) { for (Iterator groupIterator = groups.iterator(); groupIterator.hasNext();) @@ -1517,7 +1539,7 @@ DBMembershipItem topicItem = (DBMembershipItemImpl)i.next(); topicItems.add(topicItem); } - + Collection groups = null; try { @@ -1528,7 +1550,7 @@ { iue.printStackTrace(); } - + ThreadLocalManager.set("message_center_current_member_groups", groups); ThreadLocalManager.set("message_center_membership_area", areaItems); ThreadLocalManager.set("message_center_membership_forum", forumItems);