The verify limit took a place for every attempt and kept it, so the sixth
correct login of one account within 10 minutes was refused (IAWL idea 27).
Now an attempt takes its place before the compare (a parallel burst still
cannot slip under the limit), a right code gives it back, an attempt refused
without a compare gives it back at once, and a new attempt held out only by
attempts still being checked gets 429 + Retry-After: 2 "try again in a
moment". buildVerifyLimit returns limit.settle(req, correct); the plugin's
guard calls it with the package's answer. No schema change: payload-kv keeps
{ count, resetAt }.
Docs: the exempt example keyed on e-mail, which every account may change
itself (shown over REST and GraphQL): now an admin-only checkbox, with a test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
56 lines
4.4 KiB
TypeScript
56 lines
4.4 KiB
TypeScript
import { defineTexts } from '../define.js'
|
|
|
|
/** Admin component texts — two-step verification (2FA). Placeholders use Payload's {{name}} syntax. */
|
|
export const securityTexts = defineTexts({
|
|
en: {
|
|
passwordIsEmail: 'The password cannot be the same as the e-mail address.',
|
|
passwordTooShort: 'The password must have at least {{min}} characters.',
|
|
twoFactorAlertBlocked: 'Blocked because the time for setup has passed: {{count}}. Open the account in the user list and choose "Reopen setup".',
|
|
twoFactorAlertLink: 'Open the user list',
|
|
twoFactorAlertPending: 'Accounts without two-step verification: {{count}}. Until it is set up, such an account cannot use the panel.',
|
|
twoFactorAlertTitle: 'Two-step verification',
|
|
twoFactorBusy: 'Another code for this account is being checked right now. Try again in a moment.',
|
|
twoFactorReopen: 'Reopen setup',
|
|
twoFactorReset: 'Reset two-step verification',
|
|
twoFactorResetConfirm: 'This account will have to set up two-step verification again before it can use the panel. Continue?',
|
|
twoFactorResetDone: 'Done. The account can set up two-step verification now.',
|
|
twoFactorResetFailed: 'Could not reset two-step verification. Try again.',
|
|
twoFactorResetForbidden: 'Only an administrator who is fully logged in can do this.',
|
|
twoFactorSetupClosed: 'The time to set up two-step verification has passed, so this account is blocked. Ask an administrator to reopen setup for it.',
|
|
twoFactorSetupDeadline: 'Set up two-step verification by {{date}}. Until then you cannot use the panel.',
|
|
twoFactorSetupRequired: 'Set up two-step verification to use the panel.',
|
|
twoFactorStatusClosed: 'Not set up. The time for it passed on {{date}}, so the account is blocked.',
|
|
twoFactorStatusExempt: 'Not set up. This account is exempt in the site configuration.',
|
|
twoFactorStatusLabel: 'Two-step verification',
|
|
twoFactorStatusOn: 'Set up.',
|
|
twoFactorStatusOpen: 'Not set up. The account can set it up until {{date}}.',
|
|
twoFactorStatusOpenNoLimit: 'Not set up yet. The account cannot use the panel until it is.',
|
|
twoFactorTooManyAttempts: 'Too many codes were tried for this account. Wait {{minutes}} min, then enter the current code from your app.',
|
|
},
|
|
pl: {
|
|
passwordIsEmail: 'Hasło nie może być takie samo jak adres e-mail.',
|
|
passwordTooShort: 'Hasło musi mieć co najmniej {{min}} znaków.',
|
|
twoFactorAlertBlocked: 'Zablokowane, bo minął czas na konfigurację: {{count}}. Otwórz konto na liście użytkowników i wybierz „Otwórz konfigurację ponownie”.',
|
|
twoFactorAlertLink: 'Otwórz listę użytkowników',
|
|
twoFactorAlertPending: 'Konta bez weryfikacji dwuetapowej: {{count}}. Dopóki nie zostanie ustawiona, takie konto nie może korzystać z panelu.',
|
|
twoFactorAlertTitle: 'Weryfikacja dwuetapowa',
|
|
twoFactorBusy: 'Właśnie sprawdzamy inny kod dla tego konta. Spróbuj ponownie za chwilę.',
|
|
twoFactorReopen: 'Otwórz konfigurację ponownie',
|
|
twoFactorReset: 'Zresetuj weryfikację dwuetapową',
|
|
twoFactorResetConfirm: 'To konto będzie musiało ponownie ustawić weryfikację dwuetapową, zanim skorzysta z panelu. Kontynuować?',
|
|
twoFactorResetDone: 'Gotowe. Konto może teraz ustawić weryfikację dwuetapową.',
|
|
twoFactorResetFailed: 'Nie udało się zresetować weryfikacji dwuetapowej. Spróbuj ponownie.',
|
|
twoFactorResetForbidden: 'Może to zrobić tylko w pełni zalogowany administrator.',
|
|
twoFactorSetupClosed: 'Czas na ustawienie weryfikacji dwuetapowej minął, więc to konto jest zablokowane. Poproś administratora o ponowne otwarcie konfiguracji.',
|
|
twoFactorSetupDeadline: 'Ustaw weryfikację dwuetapową do {{date}}. Do tego czasu nie możesz korzystać z panelu.',
|
|
twoFactorSetupRequired: 'Ustaw weryfikację dwuetapową, aby korzystać z panelu.',
|
|
twoFactorStatusClosed: 'Nieustawiona. Czas na konfigurację minął {{date}}, więc konto jest zablokowane.',
|
|
twoFactorStatusExempt: 'Nieustawiona. To konto jest zwolnione w konfiguracji strony.',
|
|
twoFactorStatusLabel: 'Weryfikacja dwuetapowa',
|
|
twoFactorStatusOn: 'Ustawiona.',
|
|
twoFactorStatusOpen: 'Nieustawiona. Konto może ją ustawić do {{date}}.',
|
|
twoFactorStatusOpenNoLimit: 'Jeszcze nieustawiona. Do tego czasu konto nie może korzystać z panelu.',
|
|
twoFactorTooManyAttempts: 'Dla tego konta wpisano zbyt wiele kodów. Odczekaj {{minutes}} min, a potem wpisz aktualny kod z aplikacji.',
|
|
},
|
|
})
|