mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +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
22 lines
603 B
Go
22 lines
603 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 ModelPasswordLockoutPolicyToPb(policy *model.PasswordLockoutPolicyView) *policy_pb.PasswordLockoutPolicy {
|
|
return &policy_pb.PasswordLockoutPolicy{
|
|
IsDefault: policy.Default,
|
|
MaxAttempts: policy.MaxAttempts,
|
|
ShowLockoutFailure: policy.ShowLockOutFailures,
|
|
Details: object.ToViewDetailsPb(
|
|
policy.Sequence,
|
|
policy.CreationDate,
|
|
policy.ChangeDate,
|
|
"", //TODO: resourceowner
|
|
),
|
|
}
|
|
}
|