imay commented on a change in pull request #1472:  Support grant GRANT_PRIV on 
database or table level
URL: https://github.com/apache/incubator-doris/pull/1472#discussion_r303462700
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/mysql/privilege/PaloAuth.java
 ##########
 @@ -338,6 +342,39 @@ public boolean checkPrivByAuthInfo(ConnectContext ctx, 
AuthorizationInfo authInf
         return true;
     }
 
+    /*
+     * Check if current user has certain privilege.
+     * This method will check the given privilege levels
+     */
+    public boolean checkHasPriv(ConnectContext ctx, PrivPredicate priv, 
PrivLevel... levels) {
+        return checkHasPrivInternal(ctx.getRemoteIP(), ctx.getQualifiedUser(), 
priv, levels);
+    }
+
+    private boolean checkHasPrivInternal(String host, String user, 
PrivPredicate priv, PrivLevel... levels) {
+        PrivBitSet savedPrivs = PrivBitSet.of();
 
 Review comment:
   is this savedPrivs useful?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to