Skip to content

Commit

Permalink
SHIBUI-2364
Browse files Browse the repository at this point in the history
code cleanup
  • Loading branch information
chasegawa committed Sep 8, 2022
1 parent 51395cd commit d5018e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ public Iterable<EntityDescriptorRepresentation> getAllDisabledAndNotOwnedByAdmin
public List<EntityDescriptorProjection> getAllEntityDescriptorProjectionsBasedOnUserAccess() throws ForbiddenException {
switch (userService.getCurrentUserAccess()) {
case ADMIN:
List<EntityDescriptorProjection> o = entityDescriptorRepository.findAllBy();//.map(edProjection -> createRepresentationFromDescriptor(edProjection)).collect(Collectors.toList());
List<EntityDescriptorProjection> o = entityDescriptorRepository.findAllBy();
return o;
case GROUP:
User user = userService.getCurrentUser();
Group group = user.getGroup();
List<EntityDescriptorProjection> ed = entityDescriptorRepository.findAllByIdOfOwner(group.getOwnerId());//.map(ed -> createRepresentationFromDescriptor(ed)).collect(Collectors.toList());
List<EntityDescriptorProjection> ed = entityDescriptorRepository.findAllByIdOfOwner(group.getOwnerId());
return ed;
default:
throw new ForbiddenException();
Expand Down

0 comments on commit d5018e7

Please sign in to comment.