Skip to content

Commit

Permalink
Release 0.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Aug 14, 2024
1 parent 7a6bd77 commit d78193e
Show file tree
Hide file tree
Showing 4 changed files with 12 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.5.6](https://github.com/dennemark/prisma-extension-casl/compare/0.5.5...0.5.6) (2024-08-14)


### Bug Fixes

* :bug: only allow creation if object fits condition ([7a6bd77](https://github.com/dennemark/prisma-extension-casl/commit/7a6bd7747e053420045a99943972715bb5d11514))

## [0.5.5](https://github.com/dennemark/prisma-extension-casl/compare/0.5.4...0.5.5) (2024-08-09)


Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@ function getFluentModel(startModel, data) {

// src/applyDataQuery.ts
function applyDataQuery(abilities, args, action, model) {
const permittedFields = getPermittedFields(abilities, action, model);
const obj = action === "update" ? void 0 : "data" in args ? args.data : "create" in args ? args.create : args;
const permittedFields = getPermittedFields(abilities, action, model, obj);
const accessibleQuery = m5(abilities, action)[model];
const mutationArgs = [];
(Array.isArray(args) ? args : [args]).map((argsEntry) => {
Expand Down
3 changes: 2 additions & 1 deletion dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ function getFluentModel(startModel, data) {

// src/applyDataQuery.ts
function applyDataQuery(abilities, args, action, model) {
const permittedFields = getPermittedFields(abilities, action, model);
const obj = action === "update" ? void 0 : "data" in args ? args.data : "create" in args ? args.create : args;
const permittedFields = getPermittedFields(abilities, action, model, obj);
const accessibleQuery = m5(abilities, action)[model];
const mutationArgs = [];
(Array.isArray(args) ? args : [args]).map((argsEntry) => {
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.5.5",
"version": "0.5.6",
"description": "Enforce casl abilities on prisma client ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit d78193e

Please sign in to comment.