minimalist_authentication 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7729e88f86ac9b5f9a20bc3ea20376c3ca4357cba72ee64fd9ff6b43f303d33f
|
4
|
+
data.tar.gz: 263033c938eabe257b2059d0d04ca032b5f7ff49d718c78146e125fd719dcb6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a722621655bbd7edaf447364ecd240239a2178824d503a152f2d420080eed6735f4f701a43ff2d9476fc1cf20f1875b1519c075a6cfea5a7f8f81a0816a425d3
|
7
|
+
data.tar.gz: a0b0879d07451c6c0567578d199746326524c38c36d55aaf3315f7f9f355d05d98884628a7df30ec8befd79c29751a6ea6440f983512cb9953f89a3b931d9e9f
|
@@ -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.
|