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
fix(admin): refuse to remove or demote the last admin #433
Nothing stops the last admin being deleted, losing the admin role, or deleting their own account (admin user delete and role update in src/controllers/admin.ts, and DELETE /users/me). The only way back is a direct database edit, since OWNER_EMAIL grants admin only when the account is created.
What
Refuse, with a clear error, any delete or role change that would leave no user holding admin:write
Activity
fix(admin): refuse to remove or demote the last admin (#446)