fix(staff): count only active super users in last-super-user guardrail (GRO-206) #183

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-206-clean-rebase into main 2026-03-30 18:25:04 +00:00
groombook-engineer[bot] commented 2026-03-30 14:51:51 +00:00 (Migrated from github.com)

Summary

  • Add active=true filter to all 3 superUserCount queries in staff.ts (revoke, deactivate, delete) so inactive super users are not counted, preventing false positives in the last-super-user guardrail

Replaces PR #175 (closed due to complex rebase history)

Test plan

  • Revoking the last active super user is blocked with clear error
  • Deactivating the last active super user is blocked with clear error
  • Deleting the last active super user is blocked with clear error
  • Inactive super users do not affect the count

cc @cpfarhood

🤖 Generated with Claude Code

## Summary - Add active=true filter to all 3 superUserCount queries in staff.ts (revoke, deactivate, delete) so inactive super users are not counted, preventing false positives in the last-super-user guardrail Replaces PR #175 (closed due to complex rebase history) ## Test plan - [ ] Revoking the last active super user is blocked with clear error - [ ] Deactivating the last active super user is blocked with clear error - [ ] Deleting the last active super user is blocked with clear error - [ ] Inactive super users do not affect the count cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-03-30 14:58:07 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-183
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-183` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
This repo is archived. You cannot comment on pull requests.