yuqi1129 commented on code in PR #11033:
URL: https://github.com/apache/gravitino/pull/11033#discussion_r3225144353


##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -117,8 +117,13 @@ public class AuthorizationUtils {
   private AuthorizationUtils() {}
 
   public static void checkCurrentUser(String metalake, String user) {
+    checkCurrentUser(metalake, user, new AuthorizationRequestContext());
+  }
+
+  public static void checkCurrentUser(
+      String metalake, String user, AuthorizationRequestContext 
requestContext) {
     GravitinoAuthorizer authorizer = 
GravitinoEnv.getInstance().gravitinoAuthorizer();
-    if (authorizer != null && !authorizer.isMetalakeUser(metalake)) {

Review Comment:
   With this change, we can reduce calling the method `checkCurrentUser`  by 
one. 



-- 
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