[DS-707] Correctness

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5633 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2010-10-25 12:57:45 +00:00
parent c64399459f
commit 5fa0e9deae
23 changed files with 110 additions and 93 deletions

View File

@@ -528,25 +528,26 @@ public class X509Authentication implements AuthenticationMethod
if (authenticated)
{
List<String> groupNames = new ArrayList<String>();
List<String> groupNames = getX509Groups();
List<Integer> groupIDs = new ArrayList<Integer>();
groupNames = getX509Groups();
for (String groupName : groupNames)
if (groupNames != null)
{
if (groupName != null)
for (String groupName : groupNames)
{
Group group = Group.findByName(context, groupName);
if (group != null)
if (groupName != null)
{
groupIDs.add(Integer.valueOf(group.getID()));
}
else
{
log.warn(LogManager.getHeader(context,
"configuration_error", "unknown_group="
+ groupName));
Group group = Group.findByName(context, groupName);
if (group != null)
{
groupIDs.add(Integer.valueOf(group.getID()));
}
else
{
log.warn(LogManager.getHeader(context,
"configuration_error", "unknown_group="
+ groupName));
}
}
}
}