You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: admin beforeRoleChange and onAccountStatusChanged hooks skip bulk, account-operations and case paths #466
bugSomething isn't workingextensionInvolves an extension or companion package (store, ui, auth, admin)importantHigh-priority work selected for near-term focus
main at d939969 (static source review; not executed against a deployment). Node/OS/deployment: not applicable.
Minimal reproduction
Reported by review, not independently reproduced.
The beforeRoleChange veto hook runs only on the /users/roles path (packages/admin/src/admin.ts lines 333-338). Other paths change roles without calling it:
/account-operations with assign-roles, including bulk selection — packages/admin/src/admin-account.ts lines 34 and 42 (stageAccountAdministration).
Recovery/support case creation with action roles and its approval — admin.ts lines 288 and 300.
Likewise onAccountStatusChanged fires only on /users/status (admin.ts lines 346-347). It does not fire for:
/users/bulk lock/unlock (admin.ts lines 224-232);
lock/unlock applied through an approved case.
docs/COMPOSING-A-SITE.md:260 and llms-full.txt:3676 describe the veto without qualification, so a project relying on it for policy enforcement is not protected on the other paths.
Relevant output
Expected: every administrative role change passes through beforeRoleChange, and every lock/unlock emits onAccountStatusChanged.
Suggested fix
Invoke the hooks at the service boundary (or in one shared admin helper) so every path that applies roles or status runs them, including bulk and case approval (once per affected account).
Add a test per path.
If some paths are deliberately excluded, document the limits in COMPOSING-A-SITE.md and regenerate llms-full.txt.
bugSomething isn't workingextensionInvolves an extension or companion package (store, ui, auth, admin)importantHigh-priority work selected for near-term focus
Activity
fix(admin,auth): wire role/status hooks to every path; audit the audi…
fix(admin,auth): wire role/status hooks to every path; audit the audi…