Skip to content

Commit c504c7a

Browse files
committed
fix: return from authorization error
1 parent edea409 commit c504c7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/plugin/endpoint/PluginEndpointHandlerImpl.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ public Mono<ServerResponse> runPluginEndpointMethod(PluginEndpoint endpoint, End
132132
});
133133

134134
return decisionMono.<EndpointResponse>handle((authorizationDecision, sink) -> {
135-
if(!authorizationDecision.isGranted()) sink.error(new BizException(NOT_AUTHORIZED, "NOT_AUTHORIZED"));
135+
if(!authorizationDecision.isGranted()) {
136+
sink.error(new BizException(NOT_AUTHORIZED, "NOT_AUTHORIZED"));
137+
return;
138+
}
136139
try {
137140
sink.next((EndpointResponse) handler.invoke(endpoint, PluginServerRequest.fromServerRequest(request)));
138141
} catch (IllegalAccessException | InvocationTargetException e) {

0 commit comments

Comments
 (0)