From 06a1e136ca519964d189e842dd527b3121911d47 Mon Sep 17 00:00:00 2001 From: Freedom9339 Date: Wed, 12 Feb 2025 17:29:23 +0000 Subject: [PATCH] NIFI-3785: Fixed Rebasing issues --- .../nifi/web/api/ControllerServiceResource.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java index a9f1541b4944..c6ae6a094719 100644 --- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java +++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java @@ -674,18 +674,16 @@ public Response updateControllerService( @Path("{id}/move-options") @Operation( summary = "Gets the move options for a controller service", - responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ProcessGroupOptionEntity.class))), - security = { - @SecurityRequirement(name = "Read - /flow") - } - ) - @ApiResponses( - value = { + responses = { + @ApiResponse(content = @Content(schema = @Schema(implementation = ProcessGroupOptionEntity.class))), @ApiResponse(responseCode = "400", description = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(responseCode = "401", description = "Client could not be authenticated."), @ApiResponse(responseCode = "403", description = "Client is not authorized to make this request."), @ApiResponse(responseCode = "404", description = "The specified resource could not be found."), @ApiResponse(responseCode = "409", description = "The request was valid but NiFi was not in the appropriate state to process it.") + }, + security = { + @SecurityRequirement(name = "Read - /flow") } ) public Response getProcessGroupOptions( @@ -841,10 +839,6 @@ public Response moveControllerServices( // authorize the service final ComponentAuthorizable authorizableControllerService = lookup.getControllerService(id); - if (authorizableControllerService.getAuthorizable().isAuthorized(authorizer, RequestAction.WRITE, user)) { - throw new IllegalStateException("You do not have permission to perform this action."); - } - authorizableControllerService.getAuthorizable().authorize(authorizer, RequestAction.WRITE, user); final ControllerServiceDTO requestControllerServiceDTO = serviceFacade.getControllerService(id, true).getComponent();