devise_masquerade 1.3.5 → 1.3.6
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: 289316079ab661599906ee251d276b9151b6d7b43a47131ea3683d4305cb198a
|
4
|
+
data.tar.gz: fce111853661fbfe07cab2058aefa0ceb2bf1cd15830a3740dc9f293a2126a42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d812afb79fc6e55780d5fff58432c6070bd23b5ec57d88d8706b1ee09eaf4a314bb68803a6924e731866594ba8cf4caeade6d6050c7ba888af6bebfc2058cd9
|
7
|
+
data.tar.gz: f9002c0ba65f8a347f9ba3b4b2abc7aa363784e60c3b9c7e9d6071ca131fd5484c7aac664e7b5566030792243f093793702e6d26ee620117c8126bb3316f60b0
|
data/Gemfile.lock
CHANGED
@@ -132,11 +132,10 @@ class Devise::MasqueradesController < DeviseController
|
|
132
132
|
def save_masquerade_owner_session(masqueradable_resource)
|
133
133
|
skey = session_key(masqueradable_resource)
|
134
134
|
|
135
|
-
resource_gid = send("current_#{masquerading_resource_name}").to_sgid(
|
136
|
-
expires_in: Devise.masquerade_expires_in, for: 'masquerade')
|
135
|
+
resource_gid = send("current_#{masquerading_resource_name}").to_sgid(for: 'masquerade')
|
137
136
|
|
138
137
|
# skip sharing owner id via session
|
139
|
-
Rails.cache.write(skey, resource_gid
|
138
|
+
Rails.cache.write(skey, resource_gid)
|
140
139
|
session[skey] = true
|
141
140
|
session[session_key_masquerading_resource_class] = masquerading_resource_class.name
|
142
141
|
session[session_key_masqueraded_resource_class] = masqueraded_resource_class.name
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Use back button for returning to the owner despite on expiration time.
|
2
|
+
In order to back to the owner user
|
3
|
+
As an masquerade user
|
4
|
+
I want to be able to press a simple button on the page
|
5
|
+
|
6
|
+
Scenario: Use back button
|
7
|
+
Given I logged in
|
8
|
+
And I have a user for masquerade
|
9
|
+
|
10
|
+
When I have devise masquerade expiration time in 1 second
|
11
|
+
|
12
|
+
When I am on the users page
|
13
|
+
And I login as one user
|
14
|
+
Then I should be login as this user
|
15
|
+
And I waited for 2 seconds
|
16
|
+
|
17
|
+
When I press back masquerade button
|
18
|
+
Then I should be login as owner user
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_masquerade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandr Korsak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,9 +92,11 @@ files:
|
|
92
92
|
- config/environment.rb
|
93
93
|
- devise_masquerade.gemspec
|
94
94
|
- features/back.feature
|
95
|
+
- features/expires_masquerade.feature
|
95
96
|
- features/multiple_masquerading_models.feature
|
96
97
|
- features/step_definitions/auth_steps.rb
|
97
98
|
- features/step_definitions/back_steps.rb
|
99
|
+
- features/step_definitions/expires_steps.rb
|
98
100
|
- features/step_definitions/url_helpers_steps.rb
|
99
101
|
- features/support/env.rb
|
100
102
|
- features/url_helpers.feature
|
@@ -185,9 +187,11 @@ specification_version: 4
|
|
185
187
|
summary: use for login as functionallity on your admin users pages
|
186
188
|
test_files:
|
187
189
|
- features/back.feature
|
190
|
+
- features/expires_masquerade.feature
|
188
191
|
- features/multiple_masquerading_models.feature
|
189
192
|
- features/step_definitions/auth_steps.rb
|
190
193
|
- features/step_definitions/back_steps.rb
|
194
|
+
- features/step_definitions/expires_steps.rb
|
191
195
|
- features/step_definitions/url_helpers_steps.rb
|
192
196
|
- features/support/env.rb
|
193
197
|
- features/url_helpers.feature
|