Commit 55432f71 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Bugfix GroupStatusManager

parent 8d18a841
Pipeline #681 passed with stages
in 31 seconds
......@@ -46,7 +46,7 @@ public class GroupStatusManager extends UserAwareComponent {
Permission groupPermission = permissionsManager.getCurrentUserPermission(parentGroup);
if (Permission.includes(Permission.VIEW_MEMBERS, groupPermission)) {
if (!Permission.includes(groupPermission, Permission.VIEW_MEMBERS)) {
throw new UnauthorizedException("VIEW_MEMBERS permission is needed for performing this action");
}
......@@ -82,16 +82,18 @@ public class GroupStatusManager extends UserAwareComponent {
for (int i = 0; i < groups.size(); i++) {
GroupEntity group = groups.get(i);
String groupName = names.get(group.getId());
List<String> users = membersMap.get(group.getId());
if (users != null) {
for (String userId : users) {
String email = usersMap.get(userId);
if (email == null) {
LOG.warn("Unable to retrieve information about user " + userId);
continue;
if (groupName != null) {
List<String> users = membersMap.get(group.getId());
if (users != null) {
for (String userId : users) {
String email = usersMap.get(userId);
if (email == null) {
LOG.warn("Unable to retrieve information about user " + userId);
continue;
}
String[] row = new String[]{groupName, email};
rows.add(row);
}
String[] row = new String[]{groupName, email};
rows.add(row);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment