jpie 4.1.7.pre.202611160310 → 4.1.7

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: 4a8182611c87fbbd3dd1147370c1d14277a83ea0ba4d2c22584b29f1a458e8d3
4
- data.tar.gz: bd63fa39d74753b8e61fca9fdefb8f9803c664430ecafcd28fdb107ca4fd177b
3
+ metadata.gz: 6693361f8a5fb2ff7720d1488fa54e184fa046b35c61b1c1e731d4bb453fc266
4
+ data.tar.gz: 44d36ba7dda52e19709a625a40fb3ae9f3023c76f1fe48ac680b78b701ca17da
5
5
  SHA512:
6
- metadata.gz: 1b84821f469cb2b24613275e5114b2b0ae27bcaefd4cd87920c08e6e6fff8b5d23f8f577ea65ea8d75ac5e87834f970a287c515252da83514b45a4c69254b62e
7
- data.tar.gz: 9345855f8ea242701b3dbbe99c453dcfabbf6d14a09c24e3f1f9fe0b2d14b4c7cc5c24484426b6453cc873c4afa026666841fe6e5d9beafcadb6dc2ba3d372c8
6
+ metadata.gz: 6ac33754f0475988e064b32941997d9b49e6611b6e99372a7dfd7d130ad1566314655b5fe7572d5de4f72498460f44f42c06d9367a6a76b2012b1e3844e28fd2
7
+ data.tar.gz: 4a8edb0644bda6e9a6e8fa40916fb26c4a5608c13d1c3344d4206b3c19675a3dfeb7b7eedd1eb55ff0b1f0afa5f90d9d6486fa82e12d6838a860b8a8d7ef065e
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ at release time.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.1.7] - 2026-11-18
11
+
12
+ ### Fixed
13
+
14
+ - **Keep the owner filter on a lazily read include.** A create response reads an
15
+ include through the association scope merged with the `authorization_scope`
16
+ result. When the hook filtered the owner column with a subquery, the merge
17
+ replaced the owner filter. The include then listed every record the hook
18
+ allowed, not only the records of the parent. The owner filter now goes back on
19
+ after the merge. Regression spec: `include_scope_keeps_association_filter_spec.rb`.
20
+
10
21
  ## [4.1.6] - 2026-11-13
11
22
 
12
23
  ### Fixed
@@ -113,7 +113,10 @@ module JSONAPI
113
113
 
114
114
  def build_scoped_relation(related_klass, association)
115
115
  related_base_scope = ResourceLoader.find_for_model(related_klass, namespace:).records
116
- association.scope.merge(apply_include_authorization(related_base_scope, related_klass))
116
+ owned = association.scope
117
+ # A merge replaces the owner filter when the hook filters the same column, so the owner
118
+ # filter goes back on after it. Without it the include returns every record the hook allows.
119
+ owned.merge(apply_include_authorization(related_base_scope, related_klass)).where(owned.where_clause.ast)
117
120
  end
118
121
 
119
122
  # A sideloaded `?include=` is loaded through acts_as_tenant alone, bypassing the
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSONAPI
4
- VERSION = "4.1.7.pre.202611160310"
4
+ VERSION = "4.1.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpie
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.7.pre.202611160310
4
+ version: 4.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Kampp