@@ -266,7 +266,7 @@ public List<UserIdentity> getUserIdentityForLdap(String remoteUser, String remot
266266 }
267267
268268 // ==== Global ====
269- public boolean checkGlobalPriv (UserIdentity currentUser , PrivPredicate wanted ) {
269+ protected boolean checkGlobalPriv (UserIdentity currentUser , PrivPredicate wanted ) {
270270 readLock ();
271271 try {
272272 Set <Role > roles = getRolesByUserWithLdap (currentUser );
@@ -282,7 +282,7 @@ public boolean checkGlobalPriv(UserIdentity currentUser, PrivPredicate wanted) {
282282 }
283283
284284 // ==== Catalog ====
285- public boolean checkCtlPriv (UserIdentity currentUser , String ctl , PrivPredicate wanted ) {
285+ protected boolean checkCtlPriv (UserIdentity currentUser , String ctl , PrivPredicate wanted ) {
286286 if (wanted .getPrivs ().containsNodePriv ()) {
287287 if (LOG .isDebugEnabled ()) {
288288 LOG .debug ("should not check NODE priv in catalog level. user: {}, catalog: {}" ,
@@ -305,7 +305,7 @@ public boolean checkCtlPriv(UserIdentity currentUser, String ctl, PrivPredicate
305305 }
306306
307307 // ==== Database ====
308- public boolean checkDbPriv (UserIdentity currentUser , String ctl , String db , PrivPredicate wanted ) {
308+ protected boolean checkDbPriv (UserIdentity currentUser , String ctl , String db , PrivPredicate wanted ) {
309309 if (wanted .getPrivs ().containsNodePriv ()) {
310310 if (LOG .isDebugEnabled ()) {
311311 LOG .debug ("should not check NODE priv in Database level. user: {}, db: {}" ,
@@ -329,7 +329,7 @@ public boolean checkDbPriv(UserIdentity currentUser, String ctl, String db, Priv
329329 }
330330
331331 // ==== Table ====
332- public boolean checkTblPriv (UserIdentity currentUser , String ctl , String db , String tbl , PrivPredicate wanted ) {
332+ protected boolean checkTblPriv (UserIdentity currentUser , String ctl , String db , String tbl , PrivPredicate wanted ) {
333333 if (wanted .getPrivs ().containsNodePriv ()) {
334334 if (LOG .isDebugEnabled ()) {
335335 LOG .debug ("should check NODE priv in GLOBAL level. user: {}, db: {}, tbl: {}" , currentUser , db , tbl );
@@ -353,7 +353,7 @@ public boolean checkTblPriv(UserIdentity currentUser, String ctl, String db, Str
353353 // ==== Column ====
354354 // The reason why this method throws an exception instead of returning a boolean is to
355355 // indicate which col does not have permission
356- public void checkColsPriv (UserIdentity currentUser , String ctl , String db , String tbl , Set <String > cols ,
356+ protected void checkColsPriv (UserIdentity currentUser , String ctl , String db , String tbl , Set <String > cols ,
357357 PrivPredicate wanted ) throws AuthorizationException {
358358 Set <Role > roles = getRolesByUserWithLdap (currentUser );
359359 for (String col : cols ) {
@@ -376,7 +376,7 @@ private boolean checkColPriv(String ctl, String db, String tbl,
376376 }
377377
378378 // ==== Resource ====
379- public boolean checkResourcePriv (UserIdentity currentUser , String resourceName , PrivPredicate wanted ) {
379+ protected boolean checkResourcePriv (UserIdentity currentUser , String resourceName , PrivPredicate wanted ) {
380380 readLock ();
381381 try {
382382 Set <Role > roles = getRolesByUserWithLdap (currentUser );
@@ -392,7 +392,7 @@ public boolean checkResourcePriv(UserIdentity currentUser, String resourceName,
392392 }
393393
394394 // ==== Storage Vault ====
395- public boolean checkStorageVaultPriv (UserIdentity currentUser , String storageVaultName , PrivPredicate wanted ) {
395+ protected boolean checkStorageVaultPriv (UserIdentity currentUser , String storageVaultName , PrivPredicate wanted ) {
396396 readLock ();
397397 try {
398398 Set <Role > roles = getRolesByUserWithLdap (currentUser );
@@ -408,7 +408,7 @@ public boolean checkStorageVaultPriv(UserIdentity currentUser, String storageVau
408408 }
409409
410410 // ==== Workload Group ====
411- public boolean checkWorkloadGroupPriv (UserIdentity currentUser , String workloadGroupName , PrivPredicate wanted ) {
411+ protected boolean checkWorkloadGroupPriv (UserIdentity currentUser , String workloadGroupName , PrivPredicate wanted ) {
412412 readLock ();
413413 try {
414414 // currently stream load not support ip based auth, so normal should not auth temporary
@@ -430,7 +430,7 @@ public boolean checkWorkloadGroupPriv(UserIdentity currentUser, String workloadG
430430 }
431431
432432 // ==== cloud ====
433- public boolean checkCloudPriv (UserIdentity currentUser , String cloudName ,
433+ protected boolean checkCloudPriv (UserIdentity currentUser , String cloudName ,
434434 PrivPredicate wanted , ResourceTypeEnum type ) {
435435 readLock ();
436436 try {
0 commit comments