devise_masquerade 1.3.4 → 1.3.5

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: fafd0f91896f4da500abe2c0e913f8638b76572df1ae9e0c944939369ec1e65d
4
- data.tar.gz: c2efb46ef9984c8ad297ba674ab143e7993e5a6410abf9d059bbc94dddb809cb
3
+ metadata.gz: 02e2f123857132cfdeaf49b1dbb8cef1dce29175448f862dba6387e72087ebe2
4
+ data.tar.gz: 451e8c53e1e84d565fd0fcb13439c0f3b75dd27a00fb112e0c2fd8976f67b00b
5
5
  SHA512:
6
- metadata.gz: 5215584ed67b643b1f61678f0aa7c5108a8146912a0f71e0ad8aaedeb7f87bbf4fb04e8601c6483b77540ab3742ff70c2e5b5fa231cfb2595855e3774809c506
7
- data.tar.gz: 4360334b8ad7599544121156479fc8c69eff1e76bf7e8628b3e46ae519b7a7d331a0ca547db1cd2105f4a4de213766569eaba8934c8d1aeec5d18482d304dd72
6
+ metadata.gz: 4f3ea1133abf1ae6126ce12e64fb118fa88e2627587f1e29833fb7805bd230cac706d7e4ab1f12848409cca824e670a131f8b4c3bb1e02e00a45337ab8071de0
7
+ data.tar.gz: a281f8c5bcab7bde06ca043830ed98982e38c7e061a77be364768486caf7a5f10f85b35e5788c6334806a3b98a6010e8f4e1ee170a0baba88d05723429036287
data/Gemfile.lock CHANGED
@@ -52,7 +52,7 @@ GIT
52
52
  PATH
53
53
  remote: .
54
54
  specs:
55
- devise_masquerade (1.3.4)
55
+ devise_masquerade (1.3.5)
56
56
  devise (>= 4.7.0)
57
57
  globalid (>= 0.3.6)
58
58
  railties (>= 5.2.0)
@@ -137,6 +137,7 @@ class Devise::MasqueradesController < DeviseController
137
137
 
138
138
  # skip sharing owner id via session
139
139
  Rails.cache.write(skey, resource_gid, expires_in: Devise.masquerade_expires_in)
140
+ session[skey] = true
140
141
  session[session_key_masquerading_resource_class] = masquerading_resource_class.name
141
142
  session[session_key_masqueraded_resource_class] = masqueraded_resource_class.name
142
143
  end
@@ -145,6 +146,7 @@ class Devise::MasqueradesController < DeviseController
145
146
  skey = session_key(masqueradable_resource)
146
147
 
147
148
  Rails.cache.delete(skey)
149
+ session.delete(skey)
148
150
  session.delete(session_key_masqueraded_resource_class)
149
151
  session.delete(session_key_masquerading_resource_class)
150
152
  end
@@ -41,6 +41,8 @@ module DeviseMasquerade
41
41
  return false if current_#{name}.blank?
42
42
 
43
43
  key = "devise_masquerade_#{name}_" + current_#{name}.to_param
44
+ return false if session[key].blank?
45
+
44
46
  ::Rails.cache.exist?(key.to_sym).present?
45
47
  end
46
48
 
@@ -1,3 +1,3 @@
1
1
  module DeviseMasquerade
2
- VERSION = '1.3.4'.freeze
2
+ VERSION = '1.3.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_masquerade
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandr Korsak