fix(spaces): ensure demo space is always public in access checks

getSpaceConfig() read stored visibility without the demo override,
so the client-side access gate blocked unauthenticated users from
accessing the demo space.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-22 15:47:00 -07:00
parent 692c75ee5c
commit 4c1cd21b8c
1 changed files with 3 additions and 1 deletions

View File

@ -497,9 +497,11 @@ async function getSpaceConfig(slug: string): Promise<SpaceAuthConfig | null> {
doc = getDocumentData(slug);
}
if (!doc) return null;
let vis = (doc.meta.visibility || "private") as SpaceVisibility;
if (slug === "demo") vis = "public";
return {
spaceSlug: slug,
visibility: (doc.meta.visibility || "private") as SpaceVisibility,
visibility: vis,
ownerDID: doc.meta.ownerDID || undefined,
app: "rspace",
};