2021-01-04 13:52:13 +00:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
2021-01-05 08:33:45 +00:00
|
|
|
"github.com/caos/zitadel/internal/v2/domain"
|
2021-01-04 13:52:13 +00:00
|
|
|
)
|
|
|
|
|
2021-01-05 08:33:45 +00:00
|
|
|
func orgWriteModelToOrgIAMPolicy(wm *ORGOrgIAMPolicyWriteModel) *domain.OrgIAMPolicy {
|
|
|
|
return &domain.OrgIAMPolicy{
|
2021-01-04 13:52:13 +00:00
|
|
|
ObjectRoot: writeModelToObjectRoot(wm.PolicyOrgIAMWriteModel.WriteModel),
|
|
|
|
UserLoginMustBeDomain: wm.UserLoginMustBeDomain,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-05 08:33:45 +00:00
|
|
|
func orgWriteModelToPasswordComplexityPolicy(wm *OrgPasswordComplexityPolicyWriteModel) *domain.PasswordComplexityPolicy {
|
|
|
|
return &domain.PasswordComplexityPolicy{
|
2021-01-04 13:52:13 +00:00
|
|
|
ObjectRoot: writeModelToObjectRoot(wm.PasswordComplexityPolicyWriteModel.WriteModel),
|
|
|
|
MinLength: wm.MinLength,
|
|
|
|
HasLowercase: wm.HasLowercase,
|
|
|
|
HasUppercase: wm.HasUpperCase,
|
|
|
|
HasNumber: wm.HasNumber,
|
|
|
|
HasSymbol: wm.HasSymbol,
|
|
|
|
}
|
|
|
|
}
|