mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-13 14:23:39 +00:00
fbc75d89b2
* feat: mail template/text events * feat: mail template/text events * feat: mail template/text on iam and org * feat: setup step 10 * fix: add template event * fix: add unique constraints * Update internal/static/i18n/de.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/static/i18n/de.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/static/i18n/de.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/static/i18n/de.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/iam_policy_mail_template.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/org_policy_mail_text.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/iam_policy_mail_template.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/iam_policy_mail_text.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/iam_policy_mail_text.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/org_policy_mail_template.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/org_policy_mail_template.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/v2/command/org_policy_mail_text.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: org iam policy Co-authored-by: Livio Amstutz <livio.a@gmail.com>
31 lines
919 B
Go
31 lines
919 B
Go
package admin
|
|
|
|
import (
|
|
iam_model "github.com/caos/zitadel/internal/iam/model"
|
|
"github.com/caos/zitadel/internal/v2/domain"
|
|
"github.com/caos/zitadel/pkg/grpc/admin"
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
func templateToDomain(policy *admin.DefaultMailTemplateUpdate) *domain.MailTemplate {
|
|
return &domain.MailTemplate{
|
|
Template: policy.Template,
|
|
}
|
|
}
|
|
|
|
func templateFromDomain(policy *domain.MailTemplate) *admin.DefaultMailTemplate {
|
|
return &admin.DefaultMailTemplate{
|
|
Template: policy.Template,
|
|
CreationDate: timestamppb.New(policy.CreationDate),
|
|
ChangeDate: timestamppb.New(policy.ChangeDate),
|
|
}
|
|
}
|
|
|
|
func templateViewFromModel(policy *iam_model.MailTemplateView) *admin.DefaultMailTemplateView {
|
|
return &admin.DefaultMailTemplateView{
|
|
Template: policy.Template,
|
|
CreationDate: timestamppb.New(policy.CreationDate),
|
|
ChangeDate: timestamppb.New(policy.ChangeDate),
|
|
}
|
|
}
|