D48 · Sessions also end when a membership is suspended or a role's permissions change
Accepted · 2026-10-15 · zuki · Partly supersedes D37 (which changes end sessions)
Decision: Besides a change to a member's roles or overrides (D37), a member's sessions end when their membership is suspended or removed, and every holder's sessions end when the permissions of a role they hold change. Granting the super_admin role at a new pool (R-ACC-47) ends no sessions.
Why: zuki, answering BE's notes on pack G1 (#154): "if a member's role is edited, they'll be logged out. And suspending also triggers one." A suspension takes access away just as a removed role does. The super_admin grant at a new pool only adds access, the system makes it, and permissions are never read from the token (R-ACC-49), so nothing a signed-in super_admin holds is stale. As built in G1, every super_admin would be signed out each time a pool is created.
Consequences:
- Three more triggers, same mechanism: on memberships (status set to suspended, or the row deleted) and on role_permissions (a row added or removed), each ending the affected members' sessions and stamping their profiles as D37 does. proxy.ts and
session_is_current()don't change. - R-ACC-47's grant is exempt from R-ACC-08's trigger.
- Who may change access is unchanged: only holders of user:write (super_admin) manage users and roles, and a granter gives only what they hold at that pool (R-ACC-50).
- The rules change in #164 (DOC), then the schema in BE pack G1b (#165), before the M0 exit check.