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


##########
server/src/main/java/org/apache/gravitino/server/web/rest/OwnerOperations.java:
##########
@@ -69,10 +70,14 @@ public OwnerOperations() {
   @Produces("application/vnd.gravitino.v1+json")
   @Timed(name = "get-object-owner." + MetricNames.HTTP_PROCESS_DURATION, 
absolute = true)
   @ResponseMetered(name = "get-object-owner", absolute = true)
+  @AuthorizationExpression(
+      expression = "CAN_GET_OWNER",
+      errorMessage = "Current user can not get this objects's owner")
   public Response getOwnerForObject(
-      @PathParam("metalake") String metalake,
+      @PathParam("metalake") @AuthorizationMetadata(type = 
Entity.EntityType.METALAKE)
+          String metalake,
       @PathParam("metadataObjectType") String metadataObjectType,

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