Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] Exception in Grouper-UI clicking "Manage Groups"

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] Exception in Grouper-UI clicking "Manage Groups"


Chronological Thread 
  • From: Petra Schmitz <>
  • To: "GW Brown, Information Systems and Computing" <>
  • Cc:
  • Subject: Re: [grouper-dev] Exception in Grouper-UI clicking "Manage Groups"
  • Date: Tue, 04 Mar 2008 13:37:56 +0100

Hi Gary,

thank you very much - it works!

Best regards
Petra

GW Brown, Information Systems and Computing wrote:
Hi Petra,

Would you try replacing the following method in GrouperHelper.java:

public static Set getGroupsForPrivileges(GrouperSession s, String[] privs,
int start, int pageSize, StringBuffer resultCount) throws MemberNotFoundException{
Set groupSet = new LinkedHashSet();
Set allSet = new LinkedHashSet();
Member member = MemberFinder.findBySubject(s,s.getSubject());
for (int i = 0; i < privs.length; i++) {

allSet.addAll(getGroupsOrStemsWhereMemberHasPriv(member,privs[i].toLowerCase()));
}

int end = start + pageSize;
if (end > allSet.size())
end = allSet.size();
if (resultCount != null) {
resultCount.setLength(0);
resultCount.append("" + allSet.size());
}
Iterator it = allSet.iterator();
Group group = null;
while(it.hasNext()){
try {
group = (Group) it.next();
groupSet.add(group);
}catch(ClassCastException e) {}
}
return groupSet;
}


I think the issue is that the code only expects groups to be returned, but some Stems are returned also - which isn't that surprising given the getGroupsOrStemsWhereMemberHasPriv method, but I must have changed something elsewhere which has led to a change in behaviour. If you can confirm this is the problem, I'll investigate further.

Gary



--
Petra Schmitz
Rechen- und Kommunikationszentrum - RWTH Aachen
Seffenter Weg 23, 52074 Aachen (Germany)
tel: +49 241 80 29243


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.16.

Top of Page