diff --git a/client b/client index 421b27e0..7319ea41 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 421b27e06999420f7db6a0e984cfa7699723f594 +Subproject commit 7319ea4178e68e0f7cdaf52ff1433e55bae91ed4 diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index d31bbba5..717cdcb6 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -308,11 +308,18 @@ message ProfileTreeResponse { // All profiles in the system. repeated Profile profiles = 1; + + // The profile holding the tables every profile shares. Callers browse this + // one when the user has not chosen a profile, so the name is reported here + // rather than being known in advance. + string shared_profile_name = 2; } message GetTableCatalogRequest { - // Selected profile. Omit this field to request the global-only scope. - optional string profile_name = 1; + // Profile whose tables to list, together with the shared tables every + // profile sees. The profile holding the shared tables is named like any + // other, and asking for it lists exactly those. + string profile_name = 1; } message GetTableCatalogResponse { diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index a65fe88d..7d9b5083 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.table_definition.rs b/common/src/proto/komp_ac.table_definition.rs index 8d503e60..da0117ad 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -224,6 +224,11 @@ pub struct ProfileTreeResponse { /// All profiles in the system. #[prost(message, repeated, tag = "1")] pub profiles: ::prost::alloc::vec::Vec, + /// The profile holding the tables every profile shares. Callers browse this + /// one when the user has not chosen a profile, so the name is reported here + /// rather than being known in advance. + #[prost(string, tag = "2")] + pub shared_profile_name: ::prost::alloc::string::String, } /// Nested message and enum types in `ProfileTreeResponse`. pub mod profile_tree_response { @@ -283,9 +288,11 @@ pub mod profile_tree_response { } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetTableCatalogRequest { - /// Selected profile. Omit this field to request the global-only scope. - #[prost(string, optional, tag = "1")] - pub profile_name: ::core::option::Option<::prost::alloc::string::String>, + /// Profile whose tables to list, together with the shared tables every + /// profile sees. The profile holding the shared tables is named like any + /// other, and asking for it lists exactly those. + #[prost(string, tag = "1")] + pub profile_name: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTableCatalogResponse { diff --git a/server b/server index efcd4b9e..f3efeae0 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit efcd4b9ed04370cf9459bf79dd0360b26eb38d83 +Subproject commit f3efeae04b782b5bef8cf5a4d9827933ac58190d diff --git a/web/src/pages/add_table/loader.rs b/web/src/pages/add_table/loader.rs index 641b4134..b1411b3a 100644 --- a/web/src/pages/add_table/loader.rs +++ b/web/src/pages/add_table/loader.rs @@ -73,7 +73,9 @@ pub(crate) async fn load_page( // to — see `crate::pages::table_scope`. let catalog_tables = definitions .get_table_catalog( - authenticated_request(headers, GetTableCatalogRequest { profile_name: None }) + authenticated_request(headers, GetTableCatalogRequest { + profile_name: crate::pages::GLOBAL_SCOPE.to_string(), + }) .map_err(|_| LoadError::Unauthenticated)?, ) .await diff --git a/web/src/pages/admin/admin/loader.rs b/web/src/pages/admin/admin/loader.rs index 50e0657e..cb27655c 100644 --- a/web/src/pages/admin/admin/loader.rs +++ b/web/src/pages/admin/admin/loader.rs @@ -51,7 +51,9 @@ pub(crate) async fn load_admin_page( let global_tables = table_scope::global_tables( &definitions .get_table_catalog( - authenticated_request(headers, GetTableCatalogRequest { profile_name: None }) + authenticated_request(headers, GetTableCatalogRequest { + profile_name: crate::pages::GLOBAL_SCOPE.to_string(), + }) .map_err(authentication_error)?, ) .await diff --git a/web/src/pages/admin/table_definition/loader.rs b/web/src/pages/admin/table_definition/loader.rs index d8f885be..ebd7170f 100644 --- a/web/src/pages/admin/table_definition/loader.rs +++ b/web/src/pages/admin/table_definition/loader.rs @@ -121,7 +121,9 @@ pub(crate) async fn load_page( // had just listed. let catalog_tables = definitions .get_table_catalog( - authenticated_request(headers, GetTableCatalogRequest { profile_name: None }) + authenticated_request(headers, GetTableCatalogRequest { + profile_name: crate::pages::GLOBAL_SCOPE.to_string(), + }) .map_err(|_| LoadError::Unauthenticated)?, ) .await diff --git a/web/src/pages/import_export/common/loader.rs b/web/src/pages/import_export/common/loader.rs index e3a5f24a..a88d6664 100644 --- a/web/src/pages/import_export/common/loader.rs +++ b/web/src/pages/import_export/common/loader.rs @@ -75,7 +75,9 @@ pub(crate) async fn load_catalog( let global = table_scope::global_tables( &definitions .get_table_catalog( - authenticated_request(headers, GetTableCatalogRequest { profile_name: None }) + authenticated_request(headers, GetTableCatalogRequest { + profile_name: crate::pages::GLOBAL_SCOPE.to_string(), + }) .map_err(|_| LoadError::Unauthenticated)?, ) .await