fix(dashboard): badge admins as Admin instead of No Membership (BUNYIP-108) #148
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-108-membership-badge-admin"
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?
What
Fix the dashboard membership card showing a "No Membership" badge to admins who actually have full access.
has_active_membership(util.rs) grants access forrole == Admin, butmembership_badgehad no admin case, so an admin whosemembership_statuswasNone(or Canceled/Past Due/Incomplete) rendered a "No Membership" pill next to "You have access to all applications" - a direct contradiction.Change
membership_badgenow returns an "Admin" badge for admins (early branch), reflecting the same all-access override thathas_active_membershiphonors. Non-admin states (Lifetime, Trial, Active, Grace Period, Past Due, Canceled, Incomplete, None) are unchanged.Testing (rust-builder container)
cargo test -p bunyip-web membership: admin -> "Admin" (not "No Membership"); non-admin/None -> "No Membership" (regression guard). Pass.cargo clippy -p bunyip-web --all-targets -- -D warnings: clean.cargo fmt --all --check: clean.