rhino-rails 0.9.0 → 4.0.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: c47ef7cba815b432540160ea4e7f7c59b409165faac4f8c212ebaa0da7b7de8c
4
- data.tar.gz: 30dd4573a15a7670bad146d0863ddc7e76cf94d7899351a3e7d3e40cea4cafe4
3
+ metadata.gz: 547b86334ce61b25d13d6dccaa977a5821b8bdb3b275a5fb13a8b5b62d1cd0ee
4
+ data.tar.gz: 35f4ffa23101a49ab7c1403abd51aa15a2f1f57ff1c437000e49e394b6d1b8c0
5
5
  SHA512:
6
- metadata.gz: d7934218616ccf17d3b8a8e1c52888d5fd38002f82e95850742998ff07f82123a519b2fe2619f4c952263d828443acf81ff367ac3ce3fee1170a657016b1c0f4
7
- data.tar.gz: 01c2439d3c3580470ff47bc030485075fa292e5649e85ba33e5400e45f5e14766b42ad877ca930cc580b824ddbead606cfdb78974dca0412f7dce136ac406308
6
+ metadata.gz: 68dc8254b5a402eb13ca75a7a2d3b2919aef8e1bd6f5f2ffdae273ff5bad6eb69dc34a4aa3ee5bf6c20cd66dc1cdff5b301d1989c54c2101ae4eb4b8b042caae
7
+ data.tar.gz: aae80fedc9b6b03cc433204487b0f03fb6bffeed9805aea056cad1f74398f707882c02e9a434f88cce16618ec83c6b5a617c11d1c00230b45c5edfbc0a8aee23
@@ -155,7 +155,7 @@ module Rhino
155
155
 
156
156
  templates_dir = File.expand_path("../../templates/multi_tenant/policies", __FILE__)
157
157
 
158
- %w[organization_policy role_policy].each do |policy|
158
+ %w[organization_policy role_policy user_policy].each do |policy|
159
159
  template = File.join(templates_dir, "#{policy}.rb.erb")
160
160
  next unless File.exist?(template)
161
161
 
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Policy for the User model.
4
+ #
5
+ # Required for Rhino's per-include authorization: when a resource exposes a
6
+ # User relation (e.g. ?include=assignee on Task, ?include=author on Comment,
7
+ # ?include=owner on Project), Pundit looks up UserPolicy. Without this class
8
+ # Pundit raises Pundit::NotDefinedError and the include returns 403, even for
9
+ # roles that have the `users.index` / `users.show` permission granted.
10
+ #
11
+ # Customize per-action behavior or attribute permissions as needed; defaults
12
+ # inherited from Rhino::ResourcePolicy enforce `users.<action>` permission
13
+ # slugs against the user's `user_roles.permissions` array.
14
+ class UserPolicy < Rhino::ResourcePolicy
15
+ end
data/lib/rhino/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rhino
4
- VERSION = "0.9.0"
4
+ VERSION = "4.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhino-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Cipolla
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-05-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -249,6 +248,7 @@ files:
249
248
  - lib/rhino/templates/multi_tenant/models/user_role.rb.erb
250
249
  - lib/rhino/templates/multi_tenant/policies/organization_policy.rb.erb
251
250
  - lib/rhino/templates/multi_tenant/policies/role_policy.rb.erb
251
+ - lib/rhino/templates/multi_tenant/policies/user_policy.rb.erb
252
252
  - lib/rhino/templates/multi_tenant/seeders/organization_seeder.rb.erb
253
253
  - lib/rhino/templates/multi_tenant/seeders/role_seeder.rb.erb
254
254
  - lib/rhino/templates/rhino.rb
@@ -260,7 +260,6 @@ homepage: https://github.com/rhino-project/rhino-rails
260
260
  licenses:
261
261
  - MIT
262
262
  metadata: {}
263
- post_install_message:
264
263
  rdoc_options: []
265
264
  require_paths:
266
265
  - lib
@@ -275,8 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
274
  - !ruby/object:Gem::Version
276
275
  version: '0'
277
276
  requirements: []
278
- rubygems_version: 3.5.22
279
- signing_key:
277
+ rubygems_version: 3.6.9
280
278
  specification_version: 4
281
279
  summary: Automatic REST API generation for Rails models
282
280
  test_files: []