Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/rest/src/rest-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3448,6 +3448,7 @@ export class RestServer {
for (const view of views ?? []) {
if (!view || typeof view !== 'object') continue;
const candidates: Array<{ form: any; key?: string }> = [];
// Authoring/nested shape (defineView): { form, formViews: { key: {...} } }.
if (view.form && view.form.sharing) candidates.push({ form: view.form });
const formViews = view.formViews;
if (formViews && typeof formViews === 'object') {
Expand All @@ -3457,6 +3458,14 @@ export class RestServer {
}
}
}
// Flattened registered shape (getMetaItems → one item per view:
// { name, object, viewKind:'form', config:{ data, sections, sharing } }).
// A form view carries its sharing under `config`; without this branch
// public-form resolution silently fails for the standard view metadata.
if (view.viewKind === 'form' && view.config && typeof view.config === 'object'
&& (view.config as any).sharing) {
candidates.push({ form: view.config, key: view.name });
}
for (const c of candidates) {
const sharing = c.form?.sharing;
if (!sharing || sharing.allowAnonymous !== true) continue;
Expand Down
Loading