|
1 | 1 | package io.kafbat.ui.controller; |
2 | 2 |
|
3 | 3 | import static io.kafbat.ui.model.rbac.permission.ConsumerGroupAction.DELETE; |
| 4 | +import static io.kafbat.ui.model.rbac.permission.ConsumerGroupAction.DELETE_OFFSETS; |
4 | 5 | import static io.kafbat.ui.model.rbac.permission.ConsumerGroupAction.RESET_OFFSETS; |
5 | 6 | import static io.kafbat.ui.model.rbac.permission.ConsumerGroupAction.VIEW; |
6 | | -import static io.kafbat.ui.model.rbac.permission.ConsumerGroupAction.DELETE_OFFSETS; |
7 | 7 | import static java.util.stream.Collectors.toMap; |
8 | 8 |
|
9 | 9 | import io.kafbat.ui.api.ConsumerGroupsApi; |
@@ -194,17 +194,17 @@ public Mono<ResponseEntity<Void>> deleteConsumerGroupOffsets(String clusterName, |
194 | 194 | String group, |
195 | 195 | String topic, |
196 | 196 | ServerWebExchange exchange) { |
197 | | - var context = AccessContext.builder() |
198 | | - .cluster(clusterName) |
199 | | - .topicActions(topic, TopicAction.VIEW) |
200 | | - .consumerGroupActions(group, DELETE_OFFSETS) |
201 | | - .operationName("resetConsumerGroupOffsets") |
202 | | - .build(); |
| 197 | + var context = AccessContext.builder() |
| 198 | + .cluster(clusterName) |
| 199 | + .topicActions(topic, TopicAction.VIEW) |
| 200 | + .consumerGroupActions(group, DELETE_OFFSETS) |
| 201 | + .operationName("resetConsumerGroupOffsets") |
| 202 | + .build(); |
203 | 203 |
|
204 | | - return validateAccess(context) |
205 | | - .then(consumerGroupService.deleteConsumerGroupOffsets(getCluster(clusterName), group, topic)) |
206 | | - .doOnEach(sig -> audit(context, sig)) |
207 | | - .thenReturn(ResponseEntity.ok().build()); |
| 204 | + return validateAccess(context) |
| 205 | + .then(consumerGroupService.deleteConsumerGroupOffsets(getCluster(clusterName), group, topic)) |
| 206 | + .doOnEach(sig -> audit(context, sig)) |
| 207 | + .thenReturn(ResponseEntity.ok().build()); |
208 | 208 | } |
209 | 209 |
|
210 | 210 | private ConsumerGroupsPageResponseDTO convertPage(ConsumerGroupService.ConsumerGroupsPage |
|
0 commit comments