mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-18 13:57:32 +00:00
3cdaa8193d
* fix: add context queries * typo * handle org context corretly in mgmt api * isDefault in policy converter * handle org context correctly in auth api
25 lines
682 B
Go
25 lines
682 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{
|
|
IsDefault: policy.Default,
|
|
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
|
|
),
|
|
}
|
|
}
|