feat: reset custom texts on IAM (#3160)

* fix: only show factors with state ready

* fix: get iam by id and clean up code

* fix: get iam by id and clean up code

* fix: remove unused code

* feat: add message template remove func to admin api

* fix: proto texts

* fix: proto texts
This commit is contained in:
Fabi
2022-02-04 10:25:25 +01:00
committed by GitHub
parent 9b1e0730d7
commit 31bdd3f431
7 changed files with 454 additions and 2 deletions

View File

@@ -79,6 +79,16 @@ func (wm *CustomMessageTextReadModel) Reduce() error {
wm.FooterText = ""
}
case *policy.CustomTextTemplateRemovedEvent:
if wm.Language != e.Language {
continue
}
wm.Subject = ""
wm.Title = ""
wm.PreHeader = ""
wm.Text = ""
wm.Greeting = ""
wm.ButtonText = ""
wm.FooterText = ""
wm.State = domain.PolicyStateRemoved
}
}