Skip to content

fix(backend): guard shared admin-customer users in lifecycles - #314

Merged
kisinga merged 1 commit into
mainfrom
kisinga
Jul 21, 2026
Merged

fix(backend): guard shared admin-customer users in lifecycles#314
kisinga merged 1 commit into
mainfrom
kisinga

Conversation

@kisinga

@kisinga kisinga commented Jul 20, 2026

Copy link
Copy Markdown
Owner
  • exclude customer_role from admin role checks so disable no longer strips customer access or flags dual-role users as superadmin
  • invalidate sessions via SessionService.deleteSessionsByUser so revoked permissions die immediately, not at cache expiry
  • add updateCustomerSafe/deleteCustomerSafe: stock mutations rewrite the shared user's login identifier on email change and soft-delete the shared user on customer delete
  • soft-delete channel admins (was hard remove), filter them from all query surfaces, reactivate on re-invite

- exclude __customer_role__ from admin role checks so disable no
  longer strips customer access or flags dual-role users as
  superadmin
- invalidate sessions via SessionService.deleteSessionsByUser so
  revoked permissions die immediately, not at cache expiry
- add updateCustomerSafe/deleteCustomerSafe: stock mutations
  rewrite the shared user's login identifier on email change and
  soft-delete the shared user on customer delete
- soft-delete channel admins (was hard remove), filter them from
  all query surfaces, reactivate on re-invite
@kisinga
kisinga merged commit a28dbe0 into main Jul 21, 2026
4 checks passed
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