luozenglin commented on code in PR #20242:
URL: https://github.com/apache/doris/pull/20242#discussion_r1217394459
##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java:
##########
@@ -133,6 +135,19 @@ public QueryQueue getWorkloadGroupQueryQueue(String
groupName) throws UserExcept
}
}
+ private String getWorkloadGroupName(ConnectContext context) throws
AnalysisException {
+ String groupName = context.getSessionVariable().getWorkloadGroup();
+ if (Strings.isNullOrEmpty(groupName)) {
+ groupName =
Env.getCurrentEnv().getAuth().getWorkloadGroup(context.getQualifiedUser());
+ }
+ if
(!Env.getCurrentEnv().getAccessManager().checkWorkloadGroupPriv(context,
groupName, PrivPredicate.USAGE)) {
+ ErrorReport.reportAnalysisException(
+ "Access denied; you need (at least one of) the %s
privilege(s) to use workload group '%s'.",
Review Comment:
already done this
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]