jpie 4.1.6 → 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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/json_api/serialization/concerns/includes_serialization.rb +4 -1
- data/lib/json_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6693361f8a5fb2ff7720d1488fa54e184fa046b35c61b1c1e731d4bb453fc266
|
|
4
|
+
data.tar.gz: 44d36ba7dda52e19709a625a40fb3ae9f3023c76f1fe48ac680b78b701ca17da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
data/lib/json_api/version.rb
CHANGED