Tracked under ADR 004 (#60).
Block sign-in for any user whose status is not Approved by
implementing Symfony Security's UserCheckerInterface.
Scope
App\Security\AccountStatusChecker implementing
UserCheckerInterface::checkPreAuth():
Pending → throw CustomUserMessageAccountStatusException
("security.login.error.pending").
Blocked → throw CustomUserMessageAccountStatusException
("security.login.error.blocked").
Approved → no-op.
- Wire it on the
main firewall in security.yaml via
user_checker: App\Security\AccountStatusChecker.
- Add the two translation keys to
translations/messages.da.yaml.
- Tests:
- direct unit tests for each status branch
- functional test for the login flow with a
Pending user
Related
Tracked under ADR 004 (#60).
Block sign-in for any user whose
statusis notApprovedbyimplementing Symfony Security's
UserCheckerInterface.Scope
App\Security\AccountStatusCheckerimplementingUserCheckerInterface::checkPreAuth():Pending→ throwCustomUserMessageAccountStatusException("security.login.error.pending").
Blocked→ throwCustomUserMessageAccountStatusException("security.login.error.blocked").
Approved→ no-op.mainfirewall insecurity.yamlviauser_checker: App\Security\AccountStatusChecker.translations/messages.da.yaml.PendinguserRelated
status).