kadmin 1.0.1 → 1.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: 39f3e61e92e41e31413f611ee01e56b14a44a0fa4c815e171068f79e014c95a7
4
- data.tar.gz: 4747b858220feaf8f30aa39216a4dce6de280a38c651be247b67cefcaddac096
3
+ metadata.gz: f56c7b735666074f5e864e1d5c116ff1e64c645abb8eb96c7a04751975832b87
4
+ data.tar.gz: e70fc7a5ce5f0755713dbf4353d2688f3f53c686f47a9f915167cb81c89d2ab7
5
5
  SHA512:
6
- metadata.gz: 7a9b393f56115b5f2a60dd4e1d1aa794282ad5ef5e0f35141a5f799c78ca25c8c225101d2fff83bf651f8021e153f483964f9a0c0510c153d381a3b354f2966a
7
- data.tar.gz: 6427066be26ea0db5c3838a01f1a8fd6396b28deba224db6911d7c3ba395b5378266e419eb655001ff939e70aefd83747ae9931845999f89ec73c56ae1c69ca0
6
+ metadata.gz: fa823ecd24ecfeae42ecd2783c0cce6c796412adde662c362c5fec7c4e1254d44d210114474566d941ca23411689eab72c491de353d28a6b08633355359a97d3
7
+ data.tar.gz: e881dc85cb13f0c828c2042d96ef754c5b1a4ac12bb81136fb9027617db811049a61e6f05bed00d04c29415a48873a4fac4d5aa7e45ac155bb0c5015c0f0feac
@@ -37,7 +37,7 @@ module Kadmin
37
37
 
38
38
  # @return [String] the current user identifier. Historically called current_user
39
39
  def current_user
40
- session[Kadmin::AuthController::SESSION_KEY]
40
+ Kadmin::Auth.test_user || session[Kadmin::AuthController::SESSION_KEY]
41
41
  end
42
42
 
43
43
  # @see Kadmin::Concerns::AuthorizedUser#current_user
data/lib/kadmin/auth.rb CHANGED
@@ -10,6 +10,8 @@ require 'kadmin/auth/user_store'
10
10
  module Kadmin
11
11
  module Auth
12
12
  class << self
13
+ attr_accessor :test_user
14
+
13
15
  def users
14
16
  @users ||= config.user_store_class.new
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module Kadmin
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Pepin-Perreault