mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
5c0f527a49
* fix: check if sender address is custom domain * fix: check if sender address is custom domain * fix: check if sender address is custom domain Co-authored-by: Livio Amstutz <livio.a@gmail.com>
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
package policy
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/api/grpc/object"
|
|
"github.com/zitadel/zitadel/internal/query"
|
|
policy_pb "github.com/zitadel/zitadel/pkg/grpc/policy"
|
|
)
|
|
|
|
func DomainPolicyToPb(policy *query.DomainPolicy) *policy_pb.DomainPolicy {
|
|
return &policy_pb.DomainPolicy{
|
|
UserLoginMustBeDomain: policy.UserLoginMustBeDomain,
|
|
ValidateOrgDomains: policy.ValidateOrgDomains,
|
|
SmtpSenderAddressMatchesInstanceDomain: policy.SMTPSenderAddressMatchesInstanceDomain,
|
|
IsDefault: policy.IsDefault,
|
|
Details: object.ToViewDetailsPb(
|
|
policy.Sequence,
|
|
policy.CreationDate,
|
|
policy.ChangeDate,
|
|
policy.ResourceOwner,
|
|
),
|
|
}
|
|
}
|
|
|
|
func DomainPolicyToOrgIAMPb(policy *query.DomainPolicy) *policy_pb.OrgIAMPolicy {
|
|
return &policy_pb.OrgIAMPolicy{
|
|
UserLoginMustBeDomain: policy.UserLoginMustBeDomain,
|
|
IsDefault: policy.IsDefault,
|
|
Details: object.ToViewDetailsPb(
|
|
policy.Sequence,
|
|
policy.CreationDate,
|
|
policy.ChangeDate,
|
|
policy.ResourceOwner,
|
|
),
|
|
}
|
|
}
|