@@ -1026,17 +1026,17 @@ impl AccessChecker for PrivilegeAccess {
1026
1026
. await ?;
1027
1027
}
1028
1028
// Others.
1029
- Plan :: Insert ( plan) => {
1030
- let target_table_privileges = if plan. overwrite {
1031
- vec ! [ UserPrivilegeType :: Insert , UserPrivilegeType :: Delete ]
1032
- } else {
1033
- vec ! [ UserPrivilegeType :: Insert ]
1034
- } ;
1035
- for privilege in target_table_privileges {
1036
- self . validate_table_access ( & plan. catalog , & plan. database , & plan. table , privilege, false , false ) . await ?;
1037
- }
1038
- self . validate_insert_source ( ctx, & plan. source ) . await ?;
1039
- }
1029
+ // Plan::Insert(plan) => {
1030
+ // let target_table_privileges = if plan.overwrite {
1031
+ // vec![UserPrivilegeType::Insert, UserPrivilegeType::Delete]
1032
+ // } else {
1033
+ // vec![UserPrivilegeType::Insert]
1034
+ // };
1035
+ // for privilege in target_table_privileges {
1036
+ // self.validate_table_access(&plan.catalog, &plan.database, &plan.table, privilege, false, false).await?;
1037
+ // }
1038
+ // self.validate_insert_source(ctx, &plan.source).await?;
1039
+ // }
1040
1040
Plan :: InsertMultiTable ( plan) => {
1041
1041
let target_table_privileges = if plan. overwrite {
1042
1042
vec ! [ UserPrivilegeType :: Insert , UserPrivilegeType :: Delete ]
@@ -1187,12 +1187,15 @@ impl AccessChecker for PrivilegeAccess {
1187
1187
self . validate_access ( & GrantObject :: Global , UserPrivilegeType :: Alter , false , false )
1188
1188
. await ?;
1189
1189
}
1190
- Plan :: CopyIntoTable ( plan) => {
1191
- self . validate_stage_access ( & plan. stage_table_info . stage_info , UserPrivilegeType :: Read ) . await ?;
1192
- self . validate_table_access ( plan. catalog_info . catalog_name ( ) , & plan. database_name , & plan. table_name , UserPrivilegeType :: Insert , false , false ) . await ?;
1193
- if let Some ( query) = & plan. query {
1194
- self . check ( ctx, query) . await ?;
1195
- }
1190
+ Plan :: CopyIntoTable { .. } => {
1191
+ // match &plan.source{
1192
+
1193
+ // }
1194
+ // self.validate_stage_access(&plan.stage_table_info.stage_info, UserPrivilegeType::Read).await?;
1195
+ // self.validate_table_access(&plan.catalog_name, &plan.database_name, &plan.table_name, UserPrivilegeType::Insert, false, false).await?;
1196
+ // if let Some(query) = &plan.query {
1197
+ // self.check(ctx, query).await?;
1198
+ // }
1196
1199
}
1197
1200
Plan :: CopyIntoLocation ( plan) => {
1198
1201
self . validate_stage_access ( & plan. stage , UserPrivilegeType :: Write ) . await ?;
0 commit comments