yes-auth 2.4.0 → 2.4.1

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: 2a0412602dc50d784e3ca3559ab19a74cd2e5f28459389217cfea2f6f17658bd
4
- data.tar.gz: 0a679e52feaff42d381ea838bfe1a8558b402dd9cde546d99a2ab9d41f62186a
3
+ metadata.gz: c66f5489795d6201fd07299bbf3fbd409d2c9d022d92b03d4a145b6e241a9516
4
+ data.tar.gz: 6ffac26aca9e59345363bfaff2adedf384084909a3cecf60454e8c8cb97014e1
5
5
  SHA512:
6
- metadata.gz: acbe56f96d7d389b5a3cbb0dbc74e903c27bf1745b08e9373d3e9a55bd8b31ba7c352f724aebd7f41c00803b4c9daa567b11bbc4a2a7ef47e9ccbe029b24ffd1
7
- data.tar.gz: ebf3eb792a19cdf61dcaadba53e3cb85fcf4a336e460a365308d066fd0bd982893adc7c8d2d09178eaf3231938599cae109f8f6d0c1eb1768319a281459daf03
6
+ metadata.gz: 4c57bd68920c6cd4d50ea406cc9f19a068df8c935370e6c71c7de12e6e51d7e168fd5668dbda56687dc1e7156fca33fd8e85414df5f29444c96c5c2eb1520bab
7
+ data.tar.gz: ce6d82a8b8d54b2c5ac2a1508cec70f9dfbff4bf41f4b8f87b25553abc83f71a4ae344ff53c63d3e69eb0d9539a4e45e81f0c8959fe1ee6dfd2cfd4d9f99bbea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.4.1] - 2026-09-07
4
+ - See root CHANGELOG.md for details.
5
+
3
6
  ## [2.4.0] - 2026-09-07
4
7
  - See root CHANGELOG.md for details.
5
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yes
4
4
  module Auth
5
- VERSION = '2.4.0'
5
+ VERSION = '2.4.1'
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot.define do
4
+ factory :auth_principals_read_resource_access, class: 'Yes::Auth::Principals::ReadResourceAccess' do
5
+ id { SecureRandom.uuid }
6
+ principal_id { SecureRandom.uuid }
7
+ role_id { SecureRandom.uuid }
8
+ service { '' }
9
+ scope { 'root' }
10
+ resource_id { SecureRandom.uuid }
11
+ resource_type { '' }
12
+ auth_attributes { {} }
13
+ end
14
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot.define do
4
+ factory :auth_principals_role, class: 'Yes::Auth::Principals::Role' do
5
+ id { SecureRandom.uuid }
6
+ name { 'role:name' }
7
+
8
+ trait :super_admin do
9
+ name { Yes::Auth::Principals::Role::SUPER_ADMIN_ROLE_NAME }
10
+ end
11
+
12
+ trait :company_admin do
13
+ name { 'company:admin' }
14
+ end
15
+
16
+ trait :company_editor do
17
+ name { 'company:editor' }
18
+ end
19
+
20
+ trait :company_recruiter do
21
+ name { 'company:recruiter' }
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot.define do
4
+ factory :auth_principals_user, class: 'Yes::Auth::Principals::User' do
5
+ id { SecureRandom.uuid }
6
+ auth_attributes { {} }
7
+ identity_id { SecureRandom.uuid }
8
+
9
+ trait :with_roles do
10
+ transient do
11
+ roles { [] }
12
+
13
+ after(:create) do |user, evaluator|
14
+ evaluator.roles.each do |role|
15
+ user.roles << role
16
+ end
17
+ user.save!
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot.define do
4
+ factory :auth_principals_write_resource_access, class: 'Yes::Auth::Principals::WriteResourceAccess' do
5
+ id { SecureRandom.uuid }
6
+ principal_id { SecureRandom.uuid }
7
+ role_id { SecureRandom.uuid }
8
+ context { '' }
9
+ resource_id { SecureRandom.uuid }
10
+ resource_type { '' }
11
+ auth_attributes { {} }
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yes-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Ritsche
@@ -99,6 +99,10 @@ files:
99
99
  - lib/yes/auth/read_models/principals/write_resource_access/on_write_resource_access_role_changed.rb
100
100
  - lib/yes/auth/subscriptions.rb
101
101
  - lib/yes/auth/version.rb
102
+ - spec/factories/auth_principals_read_resource_access.rb
103
+ - spec/factories/auth_principals_role.rb
104
+ - spec/factories/auth_principals_user.rb
105
+ - spec/factories/auth_principals_write_resource_access.rb
102
106
  homepage: https://github.com/yousty/yes
103
107
  licenses:
104
108
  - MIT