Skip to content

Commit

Permalink
Release 0.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Oct 11, 2024
1 parent e376852 commit 48e5bef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


## [0.7.3](https://github.com/dennemark/prisma-extension-casl/compare/0.7.2...0.7.3) (2024-10-11)


### Bug Fixes

* :bug: limit nestedAbilities rule filter to model ([e376852](https://github.com/dennemark/prisma-extension-casl/commit/e3768520247a66a1d11ec6ac06f5e960ad2b29ce))

## [0.7.2](https://github.com/dennemark/prisma-extension-casl/compare/0.7.1...0.7.2) (2024-10-11)


Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ function applyDataQuery(abilities, args, action, model, creationTree) {
});
}));
const nestedAbilities = e3(abilities.rules.filter((rule) => {
if (rule.fields) {
if (rule.fields && rule.subject === model) {
if (rule.inverted) {
const hasNoForbiddenFields = argFields.isDisjointFrom(new Set(rule.fields));
if (!rule.conditions && !hasNoForbiddenFields) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ function applyDataQuery(abilities, args, action, model, creationTree) {
});
}));
const nestedAbilities = e3(abilities.rules.filter((rule) => {
if (rule.fields) {
if (rule.fields && rule.subject === model) {
if (rule.inverted) {
const hasNoForbiddenFields = argFields.isDisjointFrom(new Set(rule.fields));
if (!rule.conditions && !hasNoForbiddenFields) {
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": "0.7.2",
"version": "0.7.3",
"description": "Enforce casl abilities on prisma client ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 48e5bef

Please sign in to comment.