[DS-242] Special groups shown for logged in user rather than for user being examined

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4056 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2009-07-07 00:28:44 +00:00
parent f565c49775
commit c703b33a2e
2 changed files with 13 additions and 5 deletions

View File

@@ -119,7 +119,6 @@ public class Group extends DSpaceObject
/** /**
* Populate Group with eperson and group objects * Populate Group with eperson and group objects
* *
* @param context
* @throws SQLException * @throws SQLException
*/ */
public void loadData() public void loadData()
@@ -473,10 +472,18 @@ public class Group extends DSpaceObject
} }
// Also need to get all "Special Groups" user is a member of! // Also need to get all "Special Groups" user is a member of!
// Otherwise, you're ignoring the user's membership to these groups! // Otherwise, you're ignoring the user's membership to these groups!
Group[] specialGroups = c.getSpecialGroups(); // However, we only do this is we are looking up the special groups
for(int j=0; j<specialGroups.length;j++) // of the current user, as we cannot look up the special groups
groupIDs.add(new Integer(specialGroups[j].getID())); // of a user who is not logged in.
if (c.getCurrentUser().getID() == e.getID())
{
Group[] specialGroups = c.getSpecialGroups();
for(Group special : specialGroups)
{
groupIDs.add(new Integer(special.getID()));
}
}
// all the users are members of the anonymous group // all the users are members of the anonymous group
groupIDs.add(new Integer(0)); groupIDs.add(new Integer(0));

View File

@@ -28,6 +28,7 @@
- [DS-216] Migrating items that use additional metadata schemas causes an NPE - [DS-216] Migrating items that use additional metadata schemas causes an NPE
- [DS-219] Internal Server error - include login details of user - [DS-219] Internal Server error - include login details of user
- [DS-221] XMLUI 'current activity' recognises Google Chrome as Safari - [DS-221] XMLUI 'current activity' recognises Google Chrome as Safari
- [DS-242] Special groups shown for logged in user rather than for user being examined
(Larry Stone) (Larry Stone)
- [DS-193] OAI RDF crosswalk fails when DC value is null - [DS-193] OAI RDF crosswalk fails when DC value is null