effective_resources 2.19.7 → 2.19.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e07e4841376e727004fa9089f33c259e564acc03061b485eca87ede10ff42fd1
|
4
|
+
data.tar.gz: ea0a6fc7a9babf63988157f30893cefb186ea20d04d009b233b7c1269aed2591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 409ac230ffdcae4195e61f1a969b7a2b945305fbeca00b9f18848750c80dc51469fcb638a2ebfc74d4c07d59216893a599891fec8aa8d643ea5bf3770f146446
|
7
|
+
data.tar.gz: 906f2e460fc11e521b9ba8338eab206ae66784c1baa3c37fd3f8bff66ba0866b08ef3377e9e696b070770e7366e507e6bc59fdcb0e61b1b0cd93fc5bdab562d5
|
@@ -3,12 +3,12 @@ module Effective
|
|
3
3
|
module Destroy
|
4
4
|
|
5
5
|
def destroy
|
6
|
-
# Reset impersonation
|
7
|
-
session[:impersonation_user_id] = nil
|
8
|
-
session[:impersonation_original_path] = nil
|
9
|
-
|
10
6
|
# Edge case where the current_user is blank. Weird session data.
|
11
7
|
if current_user.blank?
|
8
|
+
# Reset impersonation
|
9
|
+
session[:impersonation_user_id] = nil
|
10
|
+
session[:impersonation_original_path] = nil
|
11
|
+
|
12
12
|
redirect_to(root_path) and return
|
13
13
|
end
|
14
14
|
|
@@ -16,6 +16,10 @@ module Effective
|
|
16
16
|
@user = current_user.class.find(session[:impersonation_user_id])
|
17
17
|
redirect_path = after_destroy_impersonate_path_for(@user)
|
18
18
|
|
19
|
+
# Reset impersonation
|
20
|
+
session[:impersonation_user_id] = nil
|
21
|
+
session[:impersonation_original_path] = nil
|
22
|
+
|
19
23
|
expire_data_after_sign_in!
|
20
24
|
warden.session_serializer.store(@user, Devise::Mapping.find_scope!(@user))
|
21
25
|
|