restore empty global catalog handling

This commit is contained in:
Priec
2026-08-17 17:07:00 +02:00
parent 6b676bc450
commit 76f475064e
10 changed files with 14 additions and 20 deletions

View File

@@ -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.
---

View File

@@ -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)?,
)

View File

@@ -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)?,
)

View File

@@ -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)?,
)

View File

@@ -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)?,
)