mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat: add Help/Support e-mail for instance/org (#5445)
feat: help and support email in privacy policy
This commit is contained in:
@@ -9,10 +9,11 @@ import (
|
||||
type PrivacyPolicyWriteModel struct {
|
||||
eventstore.WriteModel
|
||||
|
||||
TOSLink string
|
||||
PrivacyLink string
|
||||
HelpLink string
|
||||
State domain.PolicyState
|
||||
TOSLink string
|
||||
PrivacyLink string
|
||||
HelpLink string
|
||||
SupportEmail domain.EmailAddress
|
||||
State domain.PolicyState
|
||||
}
|
||||
|
||||
func (wm *PrivacyPolicyWriteModel) Reduce() error {
|
||||
@@ -22,6 +23,7 @@ func (wm *PrivacyPolicyWriteModel) Reduce() error {
|
||||
wm.TOSLink = e.TOSLink
|
||||
wm.PrivacyLink = e.PrivacyLink
|
||||
wm.HelpLink = e.HelpLink
|
||||
wm.SupportEmail = e.SupportEmail
|
||||
wm.State = domain.PolicyStateActive
|
||||
case *policy.PrivacyPolicyChangedEvent:
|
||||
if e.PrivacyLink != nil {
|
||||
@@ -33,6 +35,9 @@ func (wm *PrivacyPolicyWriteModel) Reduce() error {
|
||||
if e.HelpLink != nil {
|
||||
wm.HelpLink = *e.HelpLink
|
||||
}
|
||||
if e.SupportEmail != nil {
|
||||
wm.SupportEmail = *e.SupportEmail
|
||||
}
|
||||
case *policy.PrivacyPolicyRemovedEvent:
|
||||
wm.State = domain.PolicyStateRemoved
|
||||
}
|
||||
|
Reference in New Issue
Block a user