Files
wekan/client/lib/accountOperationError.js
T
Lauri Ojansivu 896f1222bd Implement audited board usability and accessibility fixes.
Repair relative ordering and destination dialog lifecycles, retain failed operations, and make checklist, rule and attachment controls keyboard accessible. Improve scaled layouts and reuse canonical translated labels.

Add source-execution and Chromium/Firefox regression coverage, including awaiting background persistence before reload. Record implementation decisions and validation limits.

Thanks to xet7 !
2026-09-19 14:00:48 +03:00

9 lines
497 B
JavaScript

// Keep server diagnostics in the console; show existing localized UI messages.
// The last-admin case must precede the general authorization failure.
export function accountOperationErrorKey(error) {
if (error?.error === 'not-authorized' && error.reason === 'Cannot delete the last administrator') return 'last-admin-desc';
if (error?.error === 'not-authorized') return 'error-notAllowed';
if (error?.error === 'user-not-found') return 'error-user-doesNotExist';
return 'server-error';
}