login-control 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7af6ee1882b0f3685dc223c44daa2ad5b3114169ad7a5800541fe67d992de2b8
4
- data.tar.gz: 351736b02619a342ac1edcd8886a75e20952bbf64dc4d5cb318a255f81f18767
3
+ metadata.gz: 79173cf05ae33b909d18f5d0133cc5f5923a441eaac6a97c46f7014954366b78
4
+ data.tar.gz: 4b397e66649e66d8f5e46f396869cf7dd509fbbff0fdba3f03fd350dc70d49c0
5
5
  SHA512:
6
- metadata.gz: a471cb4d926d53a1aca7a818eeea9125d629fa670596d061af74530f253b250076ed2fc729bb6a137eb5bba1c783eaf439ec747d8bb6ddbc109d82d7a867c78b
7
- data.tar.gz: 4b3c72d956d7998319ff33394ba4c07db1cb379d4bc0021bab347f7527fc5524386728e98c08537000ae6040404610ab63ead61015d4dbd52ef5e2210fcd3aa4
6
+ metadata.gz: b76a4df603b6c1ae5fef560f30fa75f4727a8775109c1e4546a23c3a19d4cb10900680d4b2a8f22ee2da5112bfad9dbce48f8fc49c7ef8a8a608fa8275a073a8
7
+ data.tar.gz: 00e6e60b838174b6d380757bb76855c403b450bca000fab74820b93269fbbce3d1790927cd110f3fc39f34c3c27ecff00847750c52059db473392d035a886ae3
@@ -26,7 +26,10 @@ module LoginControlViewHelper
26
26
  retry_after_seconds = (Rails.configuration.x.login_control.retry_after_seconds || 30)
27
27
  logger.info "LoginControlViewHelper.captcha_tag? => #{rec.attempts.to_i}. attempt (config.x.attempts_allowed: #{attempts_allowed})" if debug
28
28
 
29
- if rec.attempts == 1
29
+ if rec.sign_in_success.to_i == 0
30
+ captcha_requested = true
31
+ logger.info "LoginControlViewHelper.captcha_tag? => captcha requested: because no successful login yet" if debug
32
+ elsif rec.attempts == 1
30
33
  captcha_requested = false
31
34
  logger.info "LoginControlViewHelper.captcha_tag? => captcha NOT requested: because first attempt after successful login" if debug
32
35
  elsif rec.attempts.to_i <= attempts_allowed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: login-control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair