[fix](auth)fix not check udf auth in nereids (#25541)
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
package org.apache.doris.catalog;
|
||||
|
||||
import org.apache.doris.cluster.ClusterNamespace;
|
||||
import org.apache.doris.mysql.privilege.PrivPredicate;
|
||||
import org.apache.doris.nereids.annotation.Developing;
|
||||
import org.apache.doris.nereids.exceptions.AnalysisException;
|
||||
import org.apache.doris.nereids.trees.expressions.functions.AggStateFunctionBuilder;
|
||||
@ -132,7 +133,8 @@ public class FunctionRegistry {
|
||||
if (ConnectContext.get() != null) {
|
||||
dbName = ClusterNamespace.getFullName(ConnectContext.get().getClusterName(),
|
||||
dbName == null ? ConnectContext.get().getDatabase() : dbName);
|
||||
if (dbName == null) {
|
||||
if (dbName == null || !Env.getCurrentEnv().getAccessManager()
|
||||
.checkDbPriv(ConnectContext.get(), dbName, PrivPredicate.SELECT)) {
|
||||
scopes = ImmutableList.of(GLOBAL_FUNCTION);
|
||||
} else {
|
||||
scopes = ImmutableList.of(dbName, GLOBAL_FUNCTION);
|
||||
|
||||
Reference in New Issue
Block a user