gavinchou commented on code in PR #42504:
URL: https://github.com/apache/doris/pull/42504#discussion_r1816780221


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java:
##########
@@ -401,6 +390,25 @@ public void update(List<Pair<String, String>> properties, 
boolean isReplay) thro
         defaultCloudCluster = newDefaultCloudCluster;
     }
 
+    private String checkCloudDefaultCluster(String[] keyArr, String value, 
String defaultComputeGroup)
+            throws ComputeGroupException, DdlException {
+        // check cluster auth
+        if 
(!Env.getCurrentEnv().getAuth().checkCloudPriv(UserIdentity.fromString(qualifiedUser),
+                value, PrivPredicate.USAGE, ResourceTypeEnum.CLUSTER)) {
+            throw new ComputeGroupException(String.format("set default compute 
group failed, "
+                + "user {} must first have auth to use this compute group ", 
value),

Review Comment:
   "user {} must first have auth to use this compute group "
   -> "user {} has no permission to use compute group {}, please grant use 
privilege first with `grant USE_PRIV to ${user}`



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to