From 103ac7f2fec4152c2c3527a53c047021ed9acd41 Mon Sep 17 00:00:00 2001 From: Zhendong Bai Date: Mon, 23 Dec 2024 17:50:14 +0800 Subject: [PATCH] when user has SelectPriv, use can visit db.table --- .../main/scala/com/pingcap/tispark/auth/TiAuthorization.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala b/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala index 7f9d8dbd89..670fff631d 100644 --- a/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala +++ b/core/src/main/scala/com/pingcap/tispark/auth/TiAuthorization.scala @@ -191,6 +191,7 @@ case class TiAuthorization private (parameters: Map[String, String], tiConf: TiC def visible(db: String, table: String): Boolean = { // Account who has ShowDBPriv is able to see all databases and tables regardless of revokes. if (globalPrivs.get().contains(MySQLPriv.AllPriv) || globalPrivs + .get().contains(MySQLPriv.SelectPriv) || globalPrivs .get() .contains(MySQLPriv.ShowDBPriv)) { return true