Skip to content

[codex] Add audience-based page access#39

Closed
naaiyy wants to merge 7 commits intomainfrom
codex/page-audience-access
Closed

[codex] Add audience-based page access#39
naaiyy wants to merge 7 commits intomainfrom
codex/page-audience-access

Conversation

@naaiyy
Copy link
Copy Markdown
Owner

@naaiyy naaiyy commented Apr 17, 2026

What changed

This adds audience-based access control for published pages.

Pages can now be marked as either public or restricted to one or more site audiences. Restricted pages are filtered consistently across public navigation, direct page routing, breadcrumbs, public search, subpage panels, published exports, and default-page resolution.

Editor flow

In the editor sidebar, each page row now has ... -> Access....

From that dialog you can:

  • leave the page public
  • restrict the page to one or more audiences
  • create a new audience
  • manage audience membership for that audience

Restricted pages also show a lock indicator in the page tree.

Backend changes

  • Added page access policy types and normalization helpers
  • Added siteAudiences and siteAudienceMembers tables
  • Added shared published-page access resolution
  • Added page access mutations and audience queries/mutations
  • Included page access policy in deploy / rollback published state

Why

The existing model only supported site-level public access. That meant a published site could not safely mix public pages with manager-only pages without leaking those pages through nav, direct links, search, or exports.

Validation

  • bun test packages/types/src/page-access.test.ts packages/types/src/access.test.ts
  • bun run check-types

Notes

This PR is opened as a draft so the Vercel preview can build and the full flow can be checked in a browser.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
base-blocks Ready Ready Preview, Comment Apr 17, 2026 2:52pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

🩺 React Doctor

react-doctor v0.0.37

✔ Select projects to scan › @baseblocks/web, @baseblocks/ui
Scanning changes: codex/page-audience-access → main

Scanning /home/runner/work/BaseBlocks/BaseBlocks/apps/web...


Failed to parse oxlint output: Failed to parse oxlint configuration file.

  �[38;2;225;80;80;1m�[0m �[38;2;225;80;80;1mRule 'component-hook-factories' not found in plugin 'react-hooks-js'�[0m
No issues detected, but lint checks failed — results are incomplete.

  React Doctor (www.react.doctor)

  Score not shown — some checks could not complete.

No changed source files in /home/runner/work/BaseBlocks/BaseBlocks/packages/ui, skipping.

@naaiyy naaiyy closed this Apr 17, 2026
@naaiyy naaiyy deleted the codex/page-audience-access branch April 17, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant