Skip to content
Snippets Groups Projects
Commit 55432f71 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Bugfix GroupStatusManager

parent 8d18a841
Branches
No related tags found
No related merge requests found
Pipeline #681 passed
...@@ -46,7 +46,7 @@ public class GroupStatusManager extends UserAwareComponent { ...@@ -46,7 +46,7 @@ public class GroupStatusManager extends UserAwareComponent {
Permission groupPermission = permissionsManager.getCurrentUserPermission(parentGroup); 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"); throw new UnauthorizedException("VIEW_MEMBERS permission is needed for performing this action");
} }
...@@ -82,16 +82,18 @@ public class GroupStatusManager extends UserAwareComponent { ...@@ -82,16 +82,18 @@ public class GroupStatusManager extends UserAwareComponent {
for (int i = 0; i < groups.size(); i++) { for (int i = 0; i < groups.size(); i++) {
GroupEntity group = groups.get(i); GroupEntity group = groups.get(i);
String groupName = names.get(group.getId()); String groupName = names.get(group.getId());
List<String> users = membersMap.get(group.getId()); if (groupName != null) {
if (users != null) { List<String> users = membersMap.get(group.getId());
for (String userId : users) { if (users != null) {
String email = usersMap.get(userId); for (String userId : users) {
if (email == null) { String email = usersMap.get(userId);
LOG.warn("Unable to retrieve information about user " + userId); if (email == null) {
continue; 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);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment