GeoServerUserGroupService ugService = getSecurityManager()
.loadUserGroupService(ugServiceName);
GeoServerRoleService gaService = getSecurityManager()
.getActiveRoleService();
RoleCalculator calc = new RoleCalculator(ugService, gaService);
tmp.addAll(rolePalette.getSelectedRoles());
calc.addInheritedRoles(tmp);
for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) {
if (group.isEnabled()) {
tmp.addAll(calc.calculateRoles(group));
}
}
result.addAll(calc.personalizeRoles(user, tmp));
} catch (IOException e) {
throw new RuntimeException(e);
}
Collections.sort(result);