You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/meta/app/src/principal/user_privilege.rs
+3-1
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,9 @@ impl UserPrivilegeSet {
207
207
let stage_privs_without_ownership = Self::available_privileges_on_stage(false);
208
208
let udf_privs_without_ownership = Self::available_privileges_on_udf(false);
209
209
let wh_privs_without_ownership = Self::available_privileges_on_warehouse(false);
210
-
let privs = make_bitflags!(UserPrivilegeType::{Usage | Super | CreateUser | DropUser | CreateRole | DropRole | CreateDatabase | Grant | CreateDataMask | CreateWarehouse});
210
+
// TODO : The warehouse functionality is not yet fully integrated. Therefore, the CreateWarehouse permission must be granted separately
211
+
// If self-created user or configured user wants to create warehouse in system-manage cluster must execute: grant create warehouse on *.* to <user_name>;
212
+
let privs = make_bitflags!(UserPrivilegeType::{Usage | Super | CreateUser | DropUser | CreateRole | DropRole | CreateDatabase | Grant | CreateDataMask});
Copy file name to clipboardexpand all lines: src/query/service/src/table_functions/show_grants/show_grants_table.rs
+7-9
Original file line number
Diff line number
Diff line change
@@ -516,7 +516,7 @@ async fn show_account_grants(
516
516
privileges.push("OWNERSHIP".to_string());
517
517
grant_list.push(format!("GRANT OWNERSHIP ON UDF {} TO {}", name, identity));
518
518
}
519
-
OwnershipObject::Warehouse{ uid } => {
519
+
OwnershipObject::Warehouse{id:uid } => {
520
520
ifletSome(sw) = warehouses
521
521
.iter()
522
522
.filter_map(|w| {
@@ -739,27 +739,25 @@ async fn show_object_grant(
739
739
returnErr(ErrorCode::InvalidArgument("The 'SHOW GRANTS ON <warehouse_name>' only supported for warehouses managed by the system. Please verify that you are using a system-managed warehouse".to_string()));
740
740
}
741
741
let warehouses = warehouse_mgr.list_warehouses().await?;
742
-
letmutuid = String::new();
742
+
letmutid = String::new();
743
743
for w in warehouses {
744
744
ifletWarehouseInfo::SystemManaged(rw) = w {
745
745
if rw.id == name {
746
-
uid = rw.role_id.to_string();
746
+
id = rw.role_id.to_string();
747
747
break;
748
748
}
749
749
}
750
750
}
751
-
if !visibility_checker.check_warehouse_visibility(&uid){
751
+
if !visibility_checker.check_warehouse_visibility(&id){
752
752
returnErr(ErrorCode::PermissionDenied(format!(
753
753
"Permission denied: No privilege on warehouse {} for user {}.",
0 commit comments