feat: add Help/Support e-mail for instance/org (#5445)

feat: help and support email in privacy policy
This commit is contained in:
Miguel Cabrerizo
2023-03-28 21:36:52 +02:00
committed by GitHub
parent 12a7c4b994
commit 1b9cea0e0c
58 changed files with 572 additions and 187 deletions
+9 -1
View File
@@ -289,7 +289,7 @@ type CustomLoginTextReadModel struct {
FooterTOS string
FooterPrivacyPolicy string
FooterHelp string
FooterHelpLink string
FooterSupportEmail string
}
func (wm *CustomLoginTextReadModel) Reduce() error {
@@ -2515,6 +2515,10 @@ func (wm *CustomLoginTextReadModel) handleFooterTextSetEvent(e *policy.CustomTex
wm.FooterHelp = e.Text
return
}
if e.Key == domain.LoginKeyFooterSupportEmail {
wm.FooterSupportEmail = e.Text
return
}
}
func (wm *CustomLoginTextReadModel) handleFooterTextRemoveEvent(e *policy.CustomTextRemovedEvent) {
@@ -2530,4 +2534,8 @@ func (wm *CustomLoginTextReadModel) handleFooterTextRemoveEvent(e *policy.Custom
wm.FooterHelp = ""
return
}
if e.Key == domain.LoginKeyFooterSupportEmail {
wm.FooterSupportEmail = ""
return
}
}