mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
e9eb5b7848
* fix: converters * fix: converters * comments
24 lines
650 B
Go
24 lines
650 B
Go
package policy
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/api/grpc/object"
|
|
"github.com/caos/zitadel/internal/iam/model"
|
|
policy_pb "github.com/caos/zitadel/pkg/grpc/policy"
|
|
)
|
|
|
|
func ModelPasswordComplexityPolicyToPb(policy *model.PasswordComplexityPolicyView) *policy_pb.PasswordComplexityPolicy {
|
|
return &policy_pb.PasswordComplexityPolicy{
|
|
MinLength: policy.MinLength,
|
|
HasUppercase: policy.HasUppercase,
|
|
HasLowercase: policy.HasLowercase,
|
|
HasNumber: policy.HasNumber,
|
|
HasSymbol: policy.HasSymbol,
|
|
Details: object.ToViewDetailsPb(
|
|
policy.Sequence,
|
|
policy.CreationDate,
|
|
policy.ChangeDate,
|
|
"", //TODO: ro
|
|
),
|
|
}
|
|
}
|