From ac04e655d0e455beacdaee43318f60ee62b72f80 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 17:09:35 +0000 Subject: [PATCH 1/2] docs: document RBAC preview role masquerade Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/docs/pages/authentication/rbac.mdx | 4 ++++ fern/products/docs/pages/changelog/2026-07-15.mdx | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 fern/products/docs/pages/changelog/2026-07-15.mdx diff --git a/fern/products/docs/pages/authentication/rbac.mdx b/fern/products/docs/pages/authentication/rbac.mdx index c58e5902e..5defd6a07 100644 --- a/fern/products/docs/pages/authentication/rbac.mdx +++ b/fern/products/docs/pages/authentication/rbac.mdx @@ -85,6 +85,10 @@ Use the `` component to [conditionally render content](/learn/docs/writing You can also combine `roles` with `products` and `versions` props. +## Preview as a role + +On a docs [preview link](/learn/docs/preview-publish/preview-changes#preview-links), a role selector lets you view the site as a specific viewer to verify role-based visibility before publishing. Pick one or more roles to see the site as a user with those roles, or select anonymous to see the public view. The docs re-render with that viewer's visibility applied, including nav pruning, `` blocks, and role-gated tabs and products. With no selection, the preview shows all content regardless of role. + ## Example Fern's RBAC demo site defines the following roles: diff --git a/fern/products/docs/pages/changelog/2026-07-15.mdx b/fern/products/docs/pages/changelog/2026-07-15.mdx new file mode 100644 index 000000000..ff587e63c --- /dev/null +++ b/fern/products/docs/pages/changelog/2026-07-15.mdx @@ -0,0 +1,7 @@ +## Preview docs as a role + +security + +You can now preview a role-gated docs site as a specific viewer. On a preview link, a role selector lets you pick one or more roles (or anonymous) and re-renders the site with that viewer's [role-based visibility](/learn/docs/authentication/features/rbac#preview-as-a-role) applied, including nav pruning, `` blocks, and role-gated tabs and products. With no selection, the preview continues to show all content. + + From 76e4ad4ba214756af6b690b52d3fe4ba517b74d3 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Wed, 15 Jul 2026 16:26:40 -0400 Subject: [PATCH 2/2] update language --- fern/products/docs/pages/changelog/2026-07-15.mdx | 2 +- .../docs/pages/preview-publish/preview-changes-locally.mdx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fern/products/docs/pages/changelog/2026-07-15.mdx b/fern/products/docs/pages/changelog/2026-07-15.mdx index ff587e63c..1841f2fba 100644 --- a/fern/products/docs/pages/changelog/2026-07-15.mdx +++ b/fern/products/docs/pages/changelog/2026-07-15.mdx @@ -2,6 +2,6 @@ security -You can now preview a role-gated docs site as a specific viewer. On a preview link, a role selector lets you pick one or more roles (or anonymous) and re-renders the site with that viewer's [role-based visibility](/learn/docs/authentication/features/rbac#preview-as-a-role) applied, including nav pruning, `` blocks, and role-gated tabs and products. With no selection, the preview continues to show all content. +Teams can now preview a role-gated docs site as a specific viewer to validate their gating before publishing. On a preview link, a role selector lets you pick one or more roles (or anonymous) and re-renders the site with that viewer's role-based visibility applied, including nav pruning, `` blocks, and role-gated tabs and products. With no selection, the preview continues to show all content. diff --git a/fern/products/docs/pages/preview-publish/preview-changes-locally.mdx b/fern/products/docs/pages/preview-publish/preview-changes-locally.mdx index 8719c4385..71d4e5dae 100644 --- a/fern/products/docs/pages/preview-publish/preview-changes-locally.mdx +++ b/fern/products/docs/pages/preview-publish/preview-changes-locally.mdx @@ -109,6 +109,8 @@ fern generate --docs --preview --id my-feature ``` +If your docs use [role-based access control](/learn/docs/authentication/features/rbac#preview-as-a-role), a role selector on the preview link lets you view the site as a specific viewer and verify role-gated visibility before publishing. + ### Manage preview links Preview links persist indefinitely — Fern doesn't auto-expire them. Any organization member can use [`fern docs preview list`](/learn/cli-api-reference/cli-reference/commands#fern-docs-preview-list) to see active previews and [`fern docs preview delete`](/learn/cli-api-reference/cli-reference/commands#fern-docs-preview-delete) to remove them when they're no longer needed. To clean up previews automatically when PRs merge, set up a [GitHub Actions workflow](#clean-up-preview-links-when-prs-merge).