Permission-gated navigation
Auto-generated from the source archive. Do not edit by hand — rerun
catalyst-changelog-syncinstead.
What changed
Section titled “What changed”- Nav items accept an optional
permission; the sidebar renders only the entries the session holds, hides groups with no surviving children, and waits for the permission load so nothing forbidden flashes. Untagged items stay always-visible. - Adds a reusable
permissionGuard(permission)factory in@aurora, next toauthenticationGuard, that awaits the async permission load and redirects to the landing route on denial. - The
CurrentAccountServiceport now exposespermissions,hasPermission(), and apermissionsLoadedreadiness signal, fed fromdPermissions.allby the IAM adapter; the HUB navigation and routes are the first consumer.
Why it matters
Section titled “Why it matters”The backend already enforces permissions on every endpoint, but the frontend rendered every menu entry and let users navigate into screens that only failed with a 403 on arrival. The menu and routes now mirror what the server would allow. This is a UX and defense-in-depth layer, not a security boundary — server-side enforcement remains the source of truth. Tagging the iam and o-auth navigation is an explicit follow-up.