CluPilotCloud/app
nexxo 92dd6cc2d8 Refuse a two-factor completion for a revoked operator
completeLogin() re-checks isActive()/isOperator() immediately before signing
in, not only at the password step. The two-factor challenge previously only
confirmed the operator row still existed (Operator::find() + a null check),
so disabling an operator or revoking every console role in the window between
the password step and the pending code did not stop the login from
completing — the realistic case is an owner locking someone out mid-login,
not a contrived one.

One check, in the static method both OperatorLogin's direct exit and
OperatorTwoFactorChallenge::verify() already share, rather than a second copy
in the challenge. completeLogin() now returns bool instead of void: false
means refused, and neither the guard nor the session was touched. Each caller
turns that into a ValidationException in its own vocabulary — 'email' /
auth.failed for the direct exit (already unreachable in practice, since
authenticate() just checked the same two conditions synchronously; kept for
defense in depth), 'code' / auth.not_an_operator for the challenge, since the
code entered may be genuinely correct and reusing "wrong code" would mislead.
2026-07-28 15:47:39 +02:00
..
Actions Refuse a portal login for an address that already belongs to an operator 2026-07-28 14:42:16 +02:00
Console Check users directly for the reverse operator-identity collision, not just customers 2026-07-28 15:36:29 +02:00
Exceptions Refuse a portal login for an address that already belongs to an operator 2026-07-28 14:42:16 +02:00
Http Match the logout exemption through AdminArea, not a bare route check 2026-07-28 15:27:06 +02:00
Livewire Refuse a two-factor completion for a revoked operator 2026-07-28 15:47:39 +02:00
Mail Stop demanding a cipher, a real port, or a decrypted password a mailbox never uses 2026-07-28 06:21:28 +02:00
Models Check users directly for the reverse operator-identity collision, not just customers 2026-07-28 15:36:29 +02:00
Notifications Pin CloudReady's null-mailbox guard and share it with the trait 2026-07-27 23:59:05 +02:00
Policies Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
Providers Stop the console serving the portal's sign-in page 2026-07-28 11:45:34 +02:00
Provisioning Measure availability, and let a customer move down again 2026-07-27 16:41:15 +02:00
Services Move the console's identity out of the customer table 2026-07-28 10:31:43 +02:00
Support Move operator two-factor enrolment off admin.settings onto its own page 2026-07-28 15:11:20 +02:00