minimalist_authentication 2.6.0 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/password_resets_controller.rb +1 -1
- data/lib/minimalist_authentication/sessions.rb +1 -1
- data/lib/minimalist_authentication/user.rb +3 -3
- data/lib/minimalist_authentication/verifiable_token.rb +1 -1
- data/lib/minimalist_authentication/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b2b926522ced063d72007717f98e12af465740245ba02a61bdcc75e53a5cab
|
4
|
+
data.tar.gz: c42e2529f6211ea1c2d81958d96a4b3711173e7b7da4ac32482cb0f2b8ca3fcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53254b7754bcbe07608c3b779c42737eaa6243e25a86aa7df21a7cd576e9cfbb1d20c3b63470ed59e69f0a7ee659e4c0075f60b493dfd1e3c28d6e0ede1fa167
|
7
|
+
data.tar.gz: bfcd187bc8c0f4602e0040c45bdead5bd3138dc1134a173bf449bd84d37b05c7c954595831d39835c7694b35c04d87d86a746701332d52a27c8d6e6754529e4b
|
@@ -10,10 +10,10 @@ module MinimalistAuthentication
|
|
10
10
|
|
11
11
|
included do
|
12
12
|
# Stores the plain text password.
|
13
|
-
|
13
|
+
attribute :password, :string
|
14
14
|
|
15
15
|
# Force validations for a blank password.
|
16
|
-
|
16
|
+
attribute :password_required, :boolean, default: false
|
17
17
|
|
18
18
|
# Hashes and stores the password on save.
|
19
19
|
before_save :hash_password
|
@@ -118,7 +118,7 @@ module MinimalistAuthentication
|
|
118
118
|
# stored OR are attempting to set a new password. Set **password_required**
|
119
119
|
# to true to force validations even when the password field is blank.
|
120
120
|
def validate_password?
|
121
|
-
active? && (password_hash.blank? || password
|
121
|
+
active? && (password_hash.blank? || password? || password_required?)
|
122
122
|
end
|
123
123
|
|
124
124
|
# Validate email for active users.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimalist_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Baldwin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bcrypt
|