[fix](auth)fix not display be_port (#25197)
fix not display be_port who has ADMIN_PRIV
This commit is contained in:
@ -58,8 +58,6 @@ public class BackendsProcDir implements ProcDirInterface {
|
||||
.add("TotalCapacity").add("UsedCapacity").add("AvailableCapacity").add("UsedPct")
|
||||
.build();
|
||||
|
||||
public static final int HOSTNAME_INDEX = 3;
|
||||
|
||||
private SystemInfoService systemInfoService;
|
||||
|
||||
public BackendsProcDir(SystemInfoService systemInfoService) {
|
||||
|
||||
@ -682,19 +682,6 @@ public class ShowExecutor {
|
||||
ProcNodeInterface procNode = showProcStmt.getNode();
|
||||
|
||||
List<List<String>> finalRows = procNode.fetchResult().getRows();
|
||||
// if this is superuser, hide ip and host info form backends info proc
|
||||
if (procNode instanceof BackendsProcDir) {
|
||||
if (!Env.getCurrentEnv().getAccessManager().checkGlobalPriv(ConnectContext.get(), PrivPredicate.OPERATOR)) {
|
||||
// hide host info
|
||||
for (List<String> row : finalRows) {
|
||||
row.remove(BackendsProcDir.HOSTNAME_INDEX);
|
||||
}
|
||||
|
||||
// mod meta data
|
||||
metaData.removeColumn(BackendsProcDir.HOSTNAME_INDEX);
|
||||
}
|
||||
}
|
||||
|
||||
resultSet = new ShowResultSet(metaData, finalRows);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user