fix(docs): make the public per-app docs read public, not entitlement-gated (BUNYIP-394) #385
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-388-public-docs-not-entitlement-gated"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 withrequires_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_appwithrequire_active_app:list_app_docsandget_app_docnow require only that the app is active. Dropped theOptionalUserextractor and the entitlement /Applicationimports. 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_groupreturnsNone), 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.