mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
feat: provide option to limit (T)OTP checks (#7693)
* feat: provide option to limit (T)OTP checks * fix requests in console * update errors pkg * cleanup * cleanup * improve naming of existing config
This commit is contained in:
@@ -491,13 +491,14 @@ func (s *Server) getLockoutPolicy(ctx context.Context, orgID string) (_ *managem
|
||||
ctx, span := tracing.NewSpan(ctx)
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
queriedLockout, err := s.query.LockoutPolicyByOrg(ctx, false, orgID, false)
|
||||
queriedLockout, err := s.query.LockoutPolicyByOrg(ctx, false, orgID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !queriedLockout.IsDefault {
|
||||
return &management_pb.AddCustomLockoutPolicyRequest{
|
||||
MaxPasswordAttempts: uint32(queriedLockout.MaxPasswordAttempts),
|
||||
MaxOtpAttempts: uint32(queriedLockout.MaxOTPAttempts),
|
||||
}, nil
|
||||
}
|
||||
return nil, nil
|
||||
|
Reference in New Issue
Block a user