@sladkoff/kysely-access-control 0.0.6 → 0.0.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.
@@ -78,8 +78,9 @@ const createAccessControlPlugin = (guard) => {
78
78
  }
79
79
  }
80
80
  }
81
- // Must be allow
82
- return super.transformUpdateQuery(node);
81
+ // Apply RLS filter from grants to WHERE clause
82
+ const newNode = Object.assign(Object.assign({}, node), { where: this._transformWhere(guardResult, node.where) });
83
+ return super.transformUpdateQuery(newNode);
83
84
  }
84
85
  /**
85
86
  * Enforce insert on a table
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "dist/index.js",
4
4
  "types": "dist/index.d.ts",
5
5
  "module": "index.ts",
6
- "version": "0.0.6",
6
+ "version": "0.0.7",
7
7
  "scripts": {
8
8
  "compile": "tsc -p tsconfig.build.json"
9
9
  },