authentication-zero 2.16.34 → 2.16.36

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: a7a21585c929c9c8eee8d33a9709add052a69019db2d1cdec5dce194afc36c67
4
- data.tar.gz: f4424c1a4166d1394fb1dc573edc0e8d90893d7e91347a9d6340de88d73f5d37
3
+ metadata.gz: 01c6ab07811e6c670432fb66c4ceb3580c69cb45c438e18a947b231d86041b35
4
+ data.tar.gz: de1d633031898842969cebc414d84c543e7efcf7675b65e2b552e5ec2c318bf3
5
5
  SHA512:
6
- metadata.gz: 45a0d2d68c6debd1c161a9c42d31263b0da1ac91ecf754f4675032e26abe208dc571f74a65b8a2a2109be3a6d66aa964a385ffd5d71c94de7c1d895b5a15e899
7
- data.tar.gz: 131dbe9839a99f982cbb271474c93ac7b10f398f770bc4827a4deb22c1ec615d8a5d1869e8ef8eccad522a17b3736708d7fef3e907c98b1caaf8be27a966cebc
6
+ metadata.gz: 1b1eacc6b8b9551a63d8bce3a49780f12dfa999901169e51370c34a4e272bccf885e00a5dcd69e9c163a216729fa1f1f8673ec6969613b2f4c444cbdfbd381ea
7
+ data.tar.gz: 82084da636d5b44ed85ee1c2c9c928ffe40549ecf742a93206f9d804a0bc6d4c4e63dc414fb558d4a551e7e73fc76ae96159ec45eb3cfde98d143dd4b1920aa9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## Authentication Zero 2.16.35 ##
2
+
3
+ * Adjust relationship so that account has many users
4
+
5
+ ## Authentication Zero 2.16.34 ##
6
+
7
+ * Adjust relationship so that account has one user
8
+
9
+ ## Authentication Zero 2.16.33 ##
10
+
11
+ * Add account to user by default when tenantable
12
+
13
+ ## Authentication Zero 2.16.32 ##
14
+
15
+ * Refactor account middleware for account scoping
16
+
17
+ ## Authentication Zero 2.16.31 ##
18
+
19
+ * Remove raising exception when Current.account is nil in AccountScoped
20
+
1
21
  ## Authentication Zero 2.16.30 ##
2
22
 
3
23
  * Add multi-tenant artifacts that you can use. (--tenantable)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.34)
4
+ authentication-zero (2.16.36)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.34"
2
+ VERSION = "2.16.36"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  class Account < ApplicationRecord
2
- has_one :user, dependent: :destroy
2
+ has_many :users, dependent: :destroy
3
3
  end
@@ -1,16 +1,14 @@
1
1
  class Current < ActiveSupport::CurrentAttributes
2
- attribute :session, :user
2
+ attribute :session
3
3
  attribute :user_agent, :ip_address
4
4
  <%- if options.tenantable? %>
5
5
  attribute :account
6
6
  <%- end -%>
7
7
 
8
- def session=(session)
9
- super; self.user = session.user
10
- end
8
+ delegate :user, to: :session, allow_nil: true
11
9
  <%- if options.tenantable? %>
12
- def user=(user)
13
- super; self.account = user.account
10
+ def session=(session)
11
+ super; self.account = session.user.account
14
12
  end
15
13
  <%- end -%>
16
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.34
4
+ version: 2.16.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2023-07-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: