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:
parent
692c75ee5c
commit
4c1cd21b8c
|
|
@ -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",
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue