fix: correctly compute user state (#8740)

# Which Problems Are Solved

A customer reported, that after a created user (in initial state) got
(manually) locked and a new initial code would be created, the user
could not be locked again.

# How the Problems Are Solved

Query for the initial code added event

# Additional Changes

None

# Additional Context

- reported by a customer
This commit is contained in:
Livio Spring 2024-10-07 16:50:17 +02:00 committed by GitHub
parent a84b259e8c
commit 91b2d67325
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,6 +97,7 @@ func (wm *UserWriteModel) Query() *eventstore.SearchQueryBuilder {
EventTypes(
user.HumanAddedType,
user.HumanRegisteredType,
user.HumanInitialCodeAddedType,
user.HumanInitializedCheckSucceededType,
user.UserIDPLinkAddedType,
user.UserIDPLinkRemovedType,