Skip to content

Commit 06a1e13

Browse files
committed
NIFI-3785: Fixed Rebasing issues
1 parent f197809 commit 06a1e13

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerServiceResource.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -674,18 +674,16 @@ public Response updateControllerService(
674674
@Path("{id}/move-options")
675675
@Operation(
676676
summary = "Gets the move options for a controller service",
677-
responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ProcessGroupOptionEntity.class))),
678-
security = {
679-
@SecurityRequirement(name = "Read - /flow")
680-
}
681-
)
682-
@ApiResponses(
683-
value = {
677+
responses = {
678+
@ApiResponse(content = @Content(schema = @Schema(implementation = ProcessGroupOptionEntity.class))),
684679
@ApiResponse(responseCode = "400", description = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."),
685680
@ApiResponse(responseCode = "401", description = "Client could not be authenticated."),
686681
@ApiResponse(responseCode = "403", description = "Client is not authorized to make this request."),
687682
@ApiResponse(responseCode = "404", description = "The specified resource could not be found."),
688683
@ApiResponse(responseCode = "409", description = "The request was valid but NiFi was not in the appropriate state to process it.")
684+
},
685+
security = {
686+
@SecurityRequirement(name = "Read - /flow")
689687
}
690688
)
691689
public Response getProcessGroupOptions(
@@ -841,10 +839,6 @@ public Response moveControllerServices(
841839
// authorize the service
842840
final ComponentAuthorizable authorizableControllerService = lookup.getControllerService(id);
843841

844-
if (authorizableControllerService.getAuthorizable().isAuthorized(authorizer, RequestAction.WRITE, user)) {
845-
throw new IllegalStateException("You do not have permission to perform this action.");
846-
}
847-
848842
authorizableControllerService.getAuthorizable().authorize(authorizer, RequestAction.WRITE, user);
849843
final ControllerServiceDTO requestControllerServiceDTO = serviceFacade.getControllerService(id, true).getComponent();
850844

0 commit comments

Comments
 (0)