zddr commented on code in PR #47708: URL: https://github.com/apache/doris/pull/47708#discussion_r1994593768
########## fe/fe-core/src/main/java/org/apache/doris/analysis/ShowTransactionStmt.java: ########## @@ -77,9 +78,9 @@ public void analyze(Analyzer analyzer) throws UserException { super.analyze(analyzer); // check auth - if (!Env.getCurrentEnv().getAccessManager().checkGlobalPriv(ConnectContext.get(), PrivPredicate.ADMIN)) { + if (!Env.getCurrentEnv().getAccessManager().checkDbPriv(ConnectContext.get(), InternalCatalog.INTERNAL_CATALOG_NAME,Strings.isNullOrEmpty(dbName)?analyzer.getDefaultDb():dbName,PrivPredicate.LOAD)) { Review Comment: analyzer.getDefaultDb() may be null, the authentication logic should be placed after the following code ``` if (Strings.isNullOrEmpty(dbName)) { dbName = analyzer.getDefaultDb(); if (Strings.isNullOrEmpty(dbName)) { ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR); } ``` -- 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