roles = applicationManager.getUserService().getAccountRoles(currentUser.getAccount().getId());
} catch (AccountNotFoundException e) {
return error(e.getMessage(), Response.status(Response.Status.NOT_FOUND));
}
RolesResponseDTO dto = new RolesResponseDTO();
List<RoleResponseDTO> roleDTOs = new ArrayList<>();
for (Role role : roles) {
roleDTOs.add(toDTO(role));
}
dto.setRoles(roleDTOs);
return Response.ok(dto).build();
}