feat: Lockout policy feature (#2341)

* feat: add lockoutpolicy feature

* feat: add tests

* fix: err handling
This commit is contained in:
Fabi
2021-09-09 15:42:28 +02:00
committed by GitHub
parent 257bf90f7e
commit 59e393728e
20 changed files with 165 additions and 8 deletions

View File

@@ -30,6 +30,7 @@ type FeaturesWriteModel struct {
MetadataUser bool
CustomTextMessage bool
CustomTextLogin bool
LockoutPolicy bool
}
func (wm *FeaturesWriteModel) Reduce() error {
@@ -94,6 +95,9 @@ func (wm *FeaturesWriteModel) Reduce() error {
if e.CustomTextLogin != nil {
wm.CustomTextLogin = *e.CustomTextLogin
}
if e.LockoutPolicy != nil {
wm.LockoutPolicy = *e.LockoutPolicy
}
case *features.FeaturesRemovedEvent:
wm.State = domain.FeaturesStateRemoved
}