Skip to content

Commit

Permalink
Update hermes-management/src/main/java/pl/allegro/tech/hermes/managem…
Browse files Browse the repository at this point in the history
…ent/api/OfflineRetransmissionEndpoint.java

Co-authored-by: Maciej Moscicki <maciej.moscicki@allegro.com>
  • Loading branch information
bartekdrobczyk and moscicky committed Aug 13, 2024
1 parent ca62a7e commit a9b3a47
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void ensurePermissionsToBothTopics(OfflineRetransmissionRequest request,
var targetTopic = topicRepository.getTopicDetails(TopicName.fromQualifiedName(request.getTargetTopic()));
var hasPermissions = validateSourceTopic(request.getSourceTopic(), requestContext) && managementRights.isUserAllowedToManageTopic(targetTopic, requestContext);
if (!hasPermissions) {
logger.info("User {} has no permissions to make retransmission {}", requestContext.getSecurityContext().getUserPrincipal(), request);
logger.info("User {} has no permissions to make offline retransmission {}", requestContext.getSecurityContext().getUserPrincipal(), request);
throw new PermissionDeniedException("User needs permissions to source and target topics.");
}
}
Expand Down

0 comments on commit a9b3a47

Please sign in to comment.