feat(auth): mirror Bunyip admin role onto lets-chat users.role (LC-413) #428
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-413-mirror-bunyip-admin-role"
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?
Bunyip is now the source of truth for the top role. On every SSO callback, lets-chat reads the
bunyip_roleclaim from the verified id_token and reconciles the localusers.role: a Bunyipadminclaim grantsadminin lets-chat without a manual promotion, and a non-admin Bunyip claim demotes a stale localadminback touserso a former Bunyip admin does not retain lets-chat admin after a Bunyip-side downgrade. The intermediatemoderatorrole is a lets-chat-internal grant and stays untouched in both directions; only admin/user mirror runs here. Reconcile runs AFTER the first-user-to-admin promotion so a brand-new deployment whose only user is a Bunyip subscriber still ends up with an admin.bunyip_rolelands onIdTokenClaimsasOption<String>(#[serde(default)]) so a pre-claim Bunyip id_token still verifies.#LC-413