mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
9d4f296c62
* fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename orgiampolicy to domain policy * fix: merge conflicts * fix: protos * fix: md files * implement deprecated org iam policy again Co-authored-by: Livio Amstutz <livio.a@gmail.com>
52 lines
1.5 KiB
Go
52 lines
1.5 KiB
Go
package command
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/domain"
|
|
)
|
|
|
|
func orgWriteModelToOrg(wm *OrgWriteModel) *domain.Org {
|
|
return &domain.Org{
|
|
ObjectRoot: writeModelToObjectRoot(wm.WriteModel),
|
|
Name: wm.Name,
|
|
State: wm.State,
|
|
PrimaryDomain: wm.PrimaryDomain,
|
|
}
|
|
}
|
|
|
|
func orgWriteModelToDomainPolicy(wm *OrgDomainPolicyWriteModel) *domain.DomainPolicy {
|
|
return &domain.DomainPolicy{
|
|
ObjectRoot: writeModelToObjectRoot(wm.PolicyDomainWriteModel.WriteModel),
|
|
UserLoginMustBeDomain: wm.UserLoginMustBeDomain,
|
|
}
|
|
}
|
|
|
|
func orgWriteModelToPasswordComplexityPolicy(wm *OrgPasswordComplexityPolicyWriteModel) *domain.PasswordComplexityPolicy {
|
|
return &domain.PasswordComplexityPolicy{
|
|
ObjectRoot: writeModelToObjectRoot(wm.PasswordComplexityPolicyWriteModel.WriteModel),
|
|
MinLength: wm.MinLength,
|
|
HasLowercase: wm.HasLowercase,
|
|
HasUppercase: wm.HasUppercase,
|
|
HasNumber: wm.HasNumber,
|
|
HasSymbol: wm.HasSymbol,
|
|
}
|
|
}
|
|
|
|
func orgDomainWriteModelToOrgDomain(wm *OrgDomainWriteModel) *domain.OrgDomain {
|
|
return &domain.OrgDomain{
|
|
ObjectRoot: writeModelToObjectRoot(wm.WriteModel),
|
|
Domain: wm.Domain,
|
|
Primary: wm.Primary,
|
|
Verified: wm.Verified,
|
|
ValidationType: wm.ValidationType,
|
|
ValidationCode: wm.ValidationCode,
|
|
}
|
|
}
|
|
|
|
func orgWriteModelToPrivacyPolicy(wm *OrgPrivacyPolicyWriteModel) *domain.PrivacyPolicy {
|
|
return &domain.PrivacyPolicy{
|
|
ObjectRoot: writeModelToObjectRoot(wm.PrivacyPolicyWriteModel.WriteModel),
|
|
TOSLink: wm.TOSLink,
|
|
PrivacyLink: wm.PrivacyLink,
|
|
}
|
|
}
|