devise 5.0.1 → 5.0.2
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: 4cffe2aa12ff3240ea7c769cce8f54514bcbf3b7937e3cae3e530fa38c504610
|
|
4
|
+
data.tar.gz: 47999dcc6dbe990d3c809b35fa138b071f5b2fa0411600093a9b4926c32567a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f40111655bc0aee66e0d02c29af7113053aa98f5c33445cccb7dbc1f8a5132ace75a2be82e9302264dfc0de579f835330eb65cf55e4d29ea4a0b4a30326ac40
|
|
7
|
+
data.tar.gz: 99e6e990cefbbdce6a851c1da5249d9ec04a7e24be193ba674052809112da1de6867ed0930f27342c80867974532aceb77fa05b28f45aebd7338d015bb168e4e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
### 5.0.2 - 2026-02-18
|
|
2
|
+
|
|
3
|
+
* enhancements
|
|
4
|
+
* Allow resource class scopes to override the global configuration for `sign_in_after_change_password` behaviour. [#5825](https://github.com/heartcombo/devise/pull/5825)
|
|
5
|
+
* Add `sign_in_after_reset_password?` check hook to passwords controller, to allow it to be customized by users. [#5826](https://github.com/heartcombo/devise/pull/5826)
|
|
6
|
+
|
|
1
7
|
### 5.0.1 - 2026-02-13
|
|
2
8
|
|
|
3
9
|
* bug fixes
|
|
@@ -36,7 +36,7 @@ class Devise::PasswordsController < DeviseController
|
|
|
36
36
|
|
|
37
37
|
if resource.errors.empty?
|
|
38
38
|
resource.unlock_access! if unlockable?(resource)
|
|
39
|
-
if
|
|
39
|
+
if sign_in_after_reset_password?
|
|
40
40
|
flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
|
|
41
41
|
set_flash_message!(:notice, flash_message)
|
|
42
42
|
resource.after_database_authentication
|
|
@@ -53,7 +53,7 @@ class Devise::PasswordsController < DeviseController
|
|
|
53
53
|
|
|
54
54
|
protected
|
|
55
55
|
def after_resetting_password_path_for(resource)
|
|
56
|
-
|
|
56
|
+
sign_in_after_reset_password? ? after_sign_in_path_for(resource) : new_session_path(resource_name)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
# The path used after sending reset password instructions
|
|
@@ -69,6 +69,11 @@ class Devise::PasswordsController < DeviseController
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
# Check if the user should be signed in automatically after resetting the password.
|
|
73
|
+
def sign_in_after_reset_password?
|
|
74
|
+
resource_class.sign_in_after_reset_password
|
|
75
|
+
end
|
|
76
|
+
|
|
72
77
|
# Check if proper Lockable module methods are present & unlock strategy
|
|
73
78
|
# allows to unlock resource on password reset
|
|
74
79
|
def unlockable?(resource)
|
|
@@ -82,12 +82,6 @@ class Devise::RegistrationsController < DeviseController
|
|
|
82
82
|
|
|
83
83
|
protected
|
|
84
84
|
|
|
85
|
-
def update_needs_confirmation?(resource, previous)
|
|
86
|
-
resource.respond_to?(:pending_reconfirmation?) &&
|
|
87
|
-
resource.pending_reconfirmation? &&
|
|
88
|
-
previous != resource.unconfirmed_email
|
|
89
|
-
end
|
|
90
|
-
|
|
91
85
|
# By default we want to require a password checks on update.
|
|
92
86
|
# You can overwrite this method in your own RegistrationsController.
|
|
93
87
|
def update_resource(resource, params)
|
|
@@ -133,6 +127,13 @@ class Devise::RegistrationsController < DeviseController
|
|
|
133
127
|
self.resource = send(:"current_#{resource_name}")
|
|
134
128
|
end
|
|
135
129
|
|
|
130
|
+
# Check if the user should be signed in automatically after updating the password.
|
|
131
|
+
def sign_in_after_change_password?
|
|
132
|
+
return true if account_update_params[:password].blank?
|
|
133
|
+
|
|
134
|
+
resource_class.sign_in_after_change_password
|
|
135
|
+
end
|
|
136
|
+
|
|
136
137
|
def sign_up_params
|
|
137
138
|
devise_parameter_sanitizer.sanitize(:sign_up)
|
|
138
139
|
end
|
|
@@ -160,9 +161,9 @@ class Devise::RegistrationsController < DeviseController
|
|
|
160
161
|
set_flash_message :notice, flash_key
|
|
161
162
|
end
|
|
162
163
|
|
|
163
|
-
def
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
def update_needs_confirmation?(resource, previous)
|
|
165
|
+
resource.respond_to?(:pending_reconfirmation?) &&
|
|
166
|
+
resource.pending_reconfirmation? &&
|
|
167
|
+
previous != resource.unconfirmed_email
|
|
167
168
|
end
|
|
168
169
|
end
|
data/lib/devise/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.0.
|
|
4
|
+
version: 5.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- José Valim
|
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
221
221
|
- !ruby/object:Gem::Version
|
|
222
222
|
version: '0'
|
|
223
223
|
requirements: []
|
|
224
|
-
rubygems_version: 4.0.
|
|
224
|
+
rubygems_version: 4.0.6
|
|
225
225
|
specification_version: 4
|
|
226
226
|
summary: Flexible authentication solution for Rails with Warden
|
|
227
227
|
test_files: []
|