Skip to content

Commit

Permalink
Release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Oct 29, 2024
1 parent fcbd014 commit 32c0730
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@


## [1.0.1](https://github.com/dennemark/prisma-extension-casl/compare/1.0.0...1.0.1) (2024-10-29)

### Bug Fixes

* :bug: correct store permissions for chained queries ([fcbd014](https://github.com/dennemark/prisma-extension-casl/commit/fcbd0142f29d9a5b1d0a02391d7d45f59a6bfeec))

## [1.0.0](https://github.com/dennemark/prisma-extension-casl/compare/0.8.1...1.0.0) (2024-10-23)

### ⚠ BREAKING CHANGES
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ function getNestedQueryRelations(args, abilities, action, model, creationSelectQ
const relationField = relationFieldsByModel[model][relation];
if (relationField) {
const nestedQueryRelations = {
...getNestedQueryRelations(args[method][relation], abilities, "read", relationField.type),
...getNestedQueryRelations(args[method][relation], abilities, action === "all" ? "all" : "read", relationField.type),
...queryRelations[relation]?.select ?? {}
};
if (nestedQueryRelations && Object.keys(nestedQueryRelations).length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ function getNestedQueryRelations(args, abilities, action, model, creationSelectQ
const relationField = relationFieldsByModel[model][relation];
if (relationField) {
const nestedQueryRelations = {
...getNestedQueryRelations(args[method][relation], abilities, "read", relationField.type),
...getNestedQueryRelations(args[method][relation], abilities, action === "all" ? "all" : "read", relationField.type),
...queryRelations[relation]?.select ?? {}
};
if (nestedQueryRelations && Object.keys(nestedQueryRelations).length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prisma-extension-casl",
"version": "1.0.0",
"version": "1.0.1",
"description": "Enforce casl abilities on prisma client ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 32c0730

Please sign in to comment.