zitadel/internal/api/grpc/policy/password_lockout_policy.go
Livio Amstutz 3cdaa8193d
fix: (org) context handling (#1429)
* fix: add context queries

* typo

* handle org context corretly in mgmt api

* isDefault in policy converter

* handle org context correctly in auth api
2021-03-17 13:10:57 +01:00

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
),
}
}