Skip to content

Commit

Permalink
SHIBUI-1740
Browse files Browse the repository at this point in the history
minor cleanup
  • Loading branch information
chasegawa committed Jul 6, 2021
1 parent 12e2750 commit 525f7c6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public void delete(String resourceId) throws ForbiddenException, EntityNotFoundE
@Override
public Iterable<EntityDescriptorRepresentation> getAllDisabledAndNotOwnedByAdmin() throws ForbiddenException {
if (!userService.currentUserIsAdmin()) {
throw new ForbiddenException("You are not authorized to perform the requested operation.");
throw new ForbiddenException();
}
return entityDescriptorRepository.findAllDisabledAndNotOwnedByAdmin().map(ed -> createRepresentationFromDescriptor(ed)).collect(Collectors.toList());
}
Expand Down Expand Up @@ -464,7 +464,7 @@ public EntityDescriptor getEntityDescriptorByResourceId(String resourceId) throw
throw new EntityNotFoundException(String.format("The entity descriptor with entity id [%s] was not found.", resourceId));
}
if (!userService.isAuthorizedFor(ed.getGroup())) {
throw new ForbiddenException("You are not authorized to perform the requested operation.");
throw new ForbiddenException();
}
return ed;
}
Expand Down Expand Up @@ -778,7 +778,7 @@ public EntityDescriptorRepresentation update(EntityDescriptorRepresentation edRe
throw new ForbiddenException("You do not have the permissions necessary to enable this service.");
}
if (!userService.isAuthorizedFor(existingEd.getGroup())) {
throw new ForbiddenException("You are not authorized to perform the requested operation.");
throw new ForbiddenException();
}
// Verify we're the only one attempting to update the EntityDescriptor
if (edRep.getVersion() != existingEd.hashCode()) {
Expand Down

0 comments on commit 525f7c6

Please sign in to comment.