feat: New user (#1153)

* fix: use pointer in events

* fix: change user requests to command side

* fix: org policy

* fix: profile
This commit is contained in:
Fabi
2021-01-06 11:12:56 +01:00
committed by GitHub
parent 61d16e4621
commit 65a8efeb0e
51 changed files with 810 additions and 283 deletions
@@ -19,8 +19,12 @@ func (rm *PasswordLockoutPolicyReadModel) Reduce() error {
rm.MaxAttempts = e.MaxAttempts
rm.ShowLockOutFailures = e.ShowLockOutFailures
case *policy.PasswordLockoutPolicyChangedEvent:
rm.MaxAttempts = e.MaxAttempts
rm.ShowLockOutFailures = e.ShowLockOutFailures
if e.MaxAttempts != nil {
rm.MaxAttempts = *e.MaxAttempts
}
if e.ShowLockOutFailures != nil {
rm.ShowLockOutFailures = *e.ShowLockOutFailures
}
}
}
return rm.ReadModel.Reduce()