diff --git a/client b/client index 20316569..1821d1fd 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 20316569327165c51760005e063513ba414458b3 +Subproject commit 1821d1fdd5e305c51a76a6cda51a49915ed6ab70 diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index 717cdcb6..a788705d 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -316,10 +316,8 @@ message ProfileTreeResponse { } message GetTableCatalogRequest { - // 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; + // Selected profile. Omit this field to request the global-only scope. + optional string profile_name = 1; } message GetTableCatalogResponse { diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 96660fe2..fe53a903 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 da0117ad..98f0c56e 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -288,11 +288,9 @@ pub mod profile_tree_response { } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetTableCatalogRequest { - /// 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, + /// 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>, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTableCatalogResponse { diff --git a/server b/server index 645b45e8..1a7b8946 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 645b45e81ba80067ff2aa1d98a2c8ef9cd603b07 +Subproject commit 1a7b8946a2e7fbb3ec57718ee56c17800470129a diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index f1ec3110..b702e9fa 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -18,11 +18,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **The shared profile is named by the backend** — `ProfileTreeResponse` gained `shared_profile_name`, and every page that browses the shared tables - now reads the name from there instead of spelling `__global` itself. The - admin panel, the table-definition workspace, the add-table builder and the - transfer pages each pass that name as `GetTableCatalogRequest.profile_name`, - which is no longer optional: the shared profile is asked for by name like - any other. + now reads the name from there instead of spelling `__global` itself. Catalog + discovery retains its global-only request, which does not require the shared + profile to have been created yet. --- diff --git a/web/src/pages/add_table/loader.rs b/web/src/pages/add_table/loader.rs index 6d157d93..f8d3886c 100644 --- a/web/src/pages/add_table/loader.rs +++ b/web/src/pages/add_table/loader.rs @@ -76,7 +76,7 @@ pub(crate) async fn load_page( let catalog_tables = definitions .get_table_catalog( authenticated_request(headers, GetTableCatalogRequest { - profile_name: shared_profile.clone(), + profile_name: None, }) .map_err(|_| LoadError::Unauthenticated)?, ) diff --git a/web/src/pages/admin/admin/loader.rs b/web/src/pages/admin/admin/loader.rs index 724e4e13..c6eae4f1 100644 --- a/web/src/pages/admin/admin/loader.rs +++ b/web/src/pages/admin/admin/loader.rs @@ -54,7 +54,7 @@ pub(crate) async fn load_admin_page( &definitions .get_table_catalog( authenticated_request(headers, GetTableCatalogRequest { - profile_name: shared_profile.clone(), + profile_name: None, }) .map_err(authentication_error)?, ) diff --git a/web/src/pages/admin/table_definition/loader.rs b/web/src/pages/admin/table_definition/loader.rs index d700cc5a..1eac25c0 100644 --- a/web/src/pages/admin/table_definition/loader.rs +++ b/web/src/pages/admin/table_definition/loader.rs @@ -125,7 +125,7 @@ pub(crate) async fn load_page( let catalog_tables = definitions .get_table_catalog( authenticated_request(headers, GetTableCatalogRequest { - profile_name: shared_profile.clone(), + profile_name: None, }) .map_err(|_| LoadError::Unauthenticated)?, ) diff --git a/web/src/pages/import_export/common/loader.rs b/web/src/pages/import_export/common/loader.rs index 715b3b9f..6eabb8f1 100644 --- a/web/src/pages/import_export/common/loader.rs +++ b/web/src/pages/import_export/common/loader.rs @@ -83,7 +83,7 @@ pub(crate) async fn load_catalog( &definitions .get_table_catalog( authenticated_request(headers, GetTableCatalogRequest { - profile_name: shared_profile.clone(), + profile_name: None, }) .map_err(|_| LoadError::Unauthenticated)?, )