Enforced approval rights

This commit is contained in:
2026-10-22 11:25:55 +02:00
parent 0261a6093e
commit 92891438f6
32 changed files with 1891 additions and 870 deletions
@@ -90,14 +90,15 @@ export const AccountActivationModal: React.FC<AccountActivationModalProps> = ({
);
}
// If result.success is true, AuthProvider updates state, and this modal unmounts automatically!
} catch (err: any) {
if (err?.response?.status === 401) {
} catch (err: unknown) {
const errObj = err as { response?: { status?: number }; message?: string };
if (errObj?.response?.status === 401) {
await onLogout();
navigate('/', { replace: true });
return;
}
setErrorMessage(
err?.message ||
errObj?.message ||
'Account activation check encountered an error. Please confirm with your administrator and try again.'
);
} finally {