mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 12:27:59 +00:00
153df2e12f
* feat: provide option to limit (T)OTP checks * fix requests in console * update errors pkg * cleanup * cleanup * improve naming of existing config
22 lines
576 B
Go
22 lines
576 B
Go
package policy
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/api/grpc/object"
|
|
"github.com/zitadel/zitadel/internal/query"
|
|
policy_pb "github.com/zitadel/zitadel/pkg/grpc/policy"
|
|
)
|
|
|
|
func ModelLockoutPolicyToPb(policy *query.LockoutPolicy) *policy_pb.LockoutPolicy {
|
|
return &policy_pb.LockoutPolicy{
|
|
IsDefault: policy.IsDefault,
|
|
MaxPasswordAttempts: policy.MaxPasswordAttempts,
|
|
MaxOtpAttempts: policy.MaxOTPAttempts,
|
|
Details: object.ToViewDetailsPb(
|
|
policy.Sequence,
|
|
policy.CreationDate,
|
|
policy.ChangeDate,
|
|
policy.ResourceOwner,
|
|
),
|
|
}
|
|
}
|