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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/yes/auth/version.rb +1 -1
- data/spec/factories/auth_principals_read_resource_access.rb +14 -0
- data/spec/factories/auth_principals_role.rb +24 -0
- data/spec/factories/auth_principals_user.rb +22 -0
- data/spec/factories/auth_principals_write_resource_access.rb +13 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c66f5489795d6201fd07299bbf3fbd409d2c9d022d92b03d4a145b6e241a9516
|
|
4
|
+
data.tar.gz: 6ffac26aca9e59345363bfaff2adedf384084909a3cecf60454e8c8cb97014e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c57bd68920c6cd4d50ea406cc9f19a068df8c935370e6c71c7de12e6e51d7e168fd5668dbda56687dc1e7156fca33fd8e85414df5f29444c96c5c2eb1520bab
|
|
7
|
+
data.tar.gz: ce6d82a8b8d54b2c5ac2a1508cec70f9dfbff4bf41f4b8f87b25553abc83f71a4ae344ff53c63d3e69eb0d9539a4e45e81f0c8959fe1ee6dfd2cfd4d9f99bbea
|
data/CHANGELOG.md
CHANGED
data/lib/yes/auth/version.rb
CHANGED
|
@@ -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.
|
|
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
|