hdygxsj commented on code in PR #9018:
URL: https://github.com/apache/gravitino/pull/9018#discussion_r2544174789


##########
server/src/main/java/org/apache/gravitino/server/web/filter/GravitinoInterceptionService.java:
##########
@@ -140,28 +150,48 @@ public Object invoke(MethodInvocation methodInvocation) 
throws Throwable {
           Map<String, Object> pathParams = 
extractPathParamsFromParameters(parameters, args);
           AuthorizationExpressionEvaluator authorizationExpressionEvaluator =
               new AuthorizationExpressionEvaluator(expression);
-          boolean authorizeResult =
-              authorizationExpressionEvaluator.evaluate(
-                  metadataContext,
-                  pathParams,
-                  new AuthorizationRequestContext(),
-                  Optional.ofNullable(entityType));
-          if (!authorizeResult) {
-            MetadataObject.Type type = 
expressionAnnotation.accessMetadataType();
-            NameIdentifier accessMetadataName =
-                metadataContext.get(Entity.EntityType.valueOf(type.name()));
-            String errorMessage = expressionAnnotation.errorMessage();
-            String currentUser = PrincipalUtils.getCurrentUserName();
-            String methodName = method.getName();
-
-            LOG.warn(
-                "Authorization failed - User: {}, Operation: {}, Metadata: {}, 
Expression: {}",
-                currentUser,
-                methodName,
-                accessMetadataName,
-                expression);
-
-            return buildNoAuthResponse(errorMessage, accessMetadataName, 
currentUser, methodName);
+          if (!isBatch) {

Review Comment:
   fixed
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to