feat(admin): add user role dialog

Admins change a user's role and see the change log. The last admin
gets a clear error when deleting their own account.
This commit is contained in:
lobo committed 2026-10-04 20:09:22 +02:00
1 parent e5091de50e
commit 13b0d5e7e9
11 files changed
+391 -18

No files matched your search

+2
View File
@@ -48,6 +48,8 @@ export default function DeleteAccountCard({email}) {
}
if (response.status === 403) {
toast.error(t('SETTINGS.DELETE_ACCOUNT.WRONG_PASSWORD'));
} else if (response.status === 409) {
toast.error(t('SETTINGS.DELETE_ACCOUNT.LAST_ADMIN'));
} else if (response.status === 429) {
const minutes = Math.ceil(Number(response.headers.get('Retry-After') ?? 900) / 60);
toast.error(t('SETTINGS.DELETE_ACCOUNT.TOO_MANY', {minutes}));