fix(docs): make the public per-app docs read public, not entitlement-gated (BUNYIP-394) #385

Merged
nrupard merged 2 commits from fix/BUNYIP-388-public-docs-not-entitlement-gated into main 2026-07-21 21:02:14 +02:00
Owner

Bug

Docs for Mokosh Server / Web are visible from the admin perspective but not the user perspective.

A BUNYIP-388 review fix gated the public docs read on the same entitlement check as get_application (gate_public_app -> EntitlementRepository::is_allowed). But bunyip-web calls the read anonymously (no cookie), so for any app with requires_entitlement = true (the Mokosh Server / Web products) the anonymous read returns 404 and the public docs page is unreachable for every user. The admin docs manager (admin cookie, no entitlement gate) still shows the pages - hence admin-yes, user-no.

Fix

Docs are public content (the BUNYIP-388 audience choice was "public"), so their visibility should not depend on the app's download/launch entitlement. Replace gate_public_app with require_active_app: list_app_docs and get_app_doc now require only that the app is active. Dropped the OptionalUser extractor and the entitlement / Application imports. An inactive or unknown app still 404s.

Verified

Build + clippy + fmt green. One file, +17/-34.

Follow-up (separate, needs a product decision)

If Mokosh Server / Web are restricted, they are hidden from a non-entitled user's catalog (build_download_group returns None), so the catalog Documentation link would not show there even though the page is now public. Surfacing restricted-but-documented apps in the catalog, or un-restricting them, is a separate call.

## Bug Docs for Mokosh Server / Web are visible from the admin perspective but not the user perspective. A BUNYIP-388 review fix gated the public docs read on the same entitlement check as `get_application` (`gate_public_app` -> `EntitlementRepository::is_allowed`). But bunyip-web calls the read **anonymously** (no cookie), so for any app with `requires_entitlement = true` (the Mokosh Server / Web products) the anonymous read returns 404 and the public docs page is unreachable for every user. The admin docs manager (admin cookie, no entitlement gate) still shows the pages - hence admin-yes, user-no. ## Fix Docs are public content (the BUNYIP-388 audience choice was "public"), so their visibility should not depend on the app's download/launch entitlement. Replace `gate_public_app` with `require_active_app`: `list_app_docs` and `get_app_doc` now require only that the app is **active**. Dropped the `OptionalUser` extractor and the entitlement / `Application` imports. An inactive or unknown app still 404s. ## Verified Build + clippy + fmt green. One file, +17/-34. ## Follow-up (separate, needs a product decision) If Mokosh Server / Web are restricted, they are hidden from a non-entitled user's catalog (`build_download_group` returns `None`), so the catalog Documentation link would not show there even though the page is now public. Surfacing restricted-but-documented apps in the catalog, or un-restricting them, is a separate call.
fix(docs): make the public per-app docs read public, not entitlement-gated (BUNYIP-394)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 30s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m1s
7f25f20a84
A BUNYIP-388 review fix gated the public docs read on the same entitlement check as get_application (gate_public_app -> is_allowed). But bunyip-web calls the read anonymously, so for any app with requires_entitlement = true (the Mokosh Server / Web products) the anonymous read 404s and the public docs page is unreachable for every user, while the admin manager still shows the pages - docs visible from admin, not from the user perspective.

Docs are public content (the BUNYIP-388 audience choice), so their visibility should not depend on the app's download/launch entitlement. Replace gate_public_app with require_active_app: list_app_docs and get_app_doc now require only that the app is active, dropping the OptionalUser extractor and the entitlement / Application imports. An inactive or unknown app still 404s.

#BUNYIP-394

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(catalog): show restricted-but-documented apps as a docs-only locked card (BUNYIP-395)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 47s
Check / fmt + clippy + build + tests (pull_request) Successful in 23m5s
Create release / Create release from merged PR (pull_request) Has been skipped
b6e1d924c2
BUNYIP-394 made the public docs read public, but a restricted product (requires_entitlement) is still hidden from a non-entitled user's catalog: build_download_group returned None for a caller who failed entitlement_satisfied, so no card and no Documentation link rendered - the docs page was reachable only by direct URL.

Now build_download_group hides a restricted, inaccessible product only when it also has no docs. When the caller lacks access but the app has docs, it returns a docs-only "locked" group: has_access = false, and the download surface (oci + assets) is computed only for a caller WITH access, so a locked group's response carries no pull reference and no assets - the download stays gated, only the app's existence and its public docs are surfaced. AppDownloadGroup gains has_access (bunyip-domain + bunyip-web, serde default true for back-compat). download_only_card renders the Documentation link whenever has_docs, and either the download affordance (has_access) or a disabled "Requires access" button.

Depends on BUNYIP-394 (same PR): the locked card's docs link resolves against the now-public docs read.

#BUNYIP-395

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch fix/BUNYIP-388-public-docs-not-entitlement-gated 2026-07-21 21:02:14 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!385
No description provided.