Skip to content

Wait for admin authorization before mounting workspace panels - #191

Merged
aldoborrero merged 1 commit into
masterfrom
fix/admin-shell-access
Sep 10, 2026
Merged

aldoborrero merged 1 commit into
masterfrom
fix/admin-shell-access

Conversation

@aldoborrero

Copy link
Copy Markdown
Member

Summary

  • Wait for a resolved administrator before mounting the admin navigation, workspace lookup, or routed panel. Previously pending and failed user requests fell through to the administrative UI.
  • Show a loading status while checking access, preserve the member/manager access notice, and expose authentication errors with a working Retry button.
  • Keep the authorized workspace in a child component so its resource lifetime follows authorization. Server-side authorization remains unchanged.

Verification

  • Five VirtualDom regressions exercise the production AdminShell with controlled authentication responses and a minimal router: pending, failed, member/manager, administrator, and error → retry → pending → administrator.
  • Assert both rendered output and that neither the workspace lookup nor the routed panel runs before authorization. Dispatch the actual retry button event for recovery.
  • All four original access regressions failed against the unchanged component. The additional retry regression caught a non-reactive resource-state read before it was corrected.
  • Server all-targets Clippy with -D warnings passed.
  • All five admin-shell tests and the existing timer-widget regression passed together; Rust formatting and git diff --check passed.
  • WASM compilation passed with the same three existing warnings (InvoiceLine, OrgBranding, PluginWidget).
  • Reuse Dioxus HTML serialization as a development-only dependency for event dispatch; no package versions or production dependencies changed.

These are component lifecycle tests, not browser or live-session end-to-end tests. They use test doubles for the server responses, user record, and routed child. No database, SQL, migrations, or server authorization changes are included. The existing required CI discovers the new test target automatically and remains required before merge.

@aldoborrero
aldoborrero added this pull request to the merge queue Sep 10, 2026
Merged via the queue into master with commit 64ba5d6 Sep 10, 2026
2 checks passed
@aldoborrero
aldoborrero deleted the fix/admin-shell-access branch September 10, 2026 05:51
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