}
Group groups[] = null;
Group groupToDisplay = null;
if (UserManager.isUserInRole(webUser, UserManagerBase.ADMINISTRATOR)) {
GroupManager groupMgm = new GroupManager(locale,session);
Long selectedGroupId = userImportForm.getGroupId();
if (selectedGroupId == null) {
// set the group name of the administrator group
groupToDisplay = webUser.getGroup();
} else {
groupToDisplay = groupMgm.getGroup(selectedGroupId);
}
// set an array of groups into the request
groups = groupMgm.getGroups();
} else if (UserManager.isUserInRole(webUser, UserManagerBase.GROUP_ADMINISTRATOR)) {
// this is a security aspect - > group administartors can only display its own group
groups = new Group[1];
Group gr = webUser.getGroup();
Hibernate.initialize(gr);