effective_resources 2.19.6 → 2.19.7
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: 755f35cecf11e51a68cc1a998a6f14ffcb60fc7f790b19989c569d7015f7082a
|
4
|
+
data.tar.gz: 28c81ad69b69c2ded6d458fde80921453777745d58d5828c81b411add7e3ac76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f734ba1bb834a8337d0ca537db43576f8290ed067653405394a8784110e137f10d885436c706c368452265282d78932cfa7824dff2b1f7f196298c06fc29ac0a
|
7
|
+
data.tar.gz: dee4966d4485ccfac7daecc4afb41cc77571d696298c5f075334de9b27b6ec11496f361ecee3528335801a3b81a09d8172b941bf3c403dda958118629693baa6
|
@@ -3,13 +3,19 @@ module Effective
|
|
3
3
|
module Destroy
|
4
4
|
|
5
5
|
def destroy
|
6
|
-
@user = current_user.class.find(session[:impersonation_user_id])
|
7
|
-
redirect_path = after_destroy_impersonate_path_for(@user)
|
8
|
-
|
9
6
|
# Reset impersonation
|
10
7
|
session[:impersonation_user_id] = nil
|
11
8
|
session[:impersonation_original_path] = nil
|
12
9
|
|
10
|
+
# Edge case where the current_user is blank. Weird session data.
|
11
|
+
if current_user.blank?
|
12
|
+
redirect_to(root_path) and return
|
13
|
+
end
|
14
|
+
|
15
|
+
# The current_user exists
|
16
|
+
@user = current_user.class.find(session[:impersonation_user_id])
|
17
|
+
redirect_path = after_destroy_impersonate_path_for(@user)
|
18
|
+
|
13
19
|
expire_data_after_sign_in!
|
14
20
|
warden.session_serializer.store(@user, Devise::Mapping.find_scope!(@user))
|
15
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|