@heyhru/business-dms-approval 0.8.1 → 0.9.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"approvals.service.d.ts","sourceRoot":"","sources":["../src/approvals.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAA0B,MAAM,SAAS,CAAC;AAazF,UAAU,oBAAqB,SAAQ,cAAc;IACnD,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAYhF;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,kBAKzE;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAWlF;AAkBD,wBAAsB,eAAe,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAUnF;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAUlF;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,IACrC,KAAK,oBAAoB,EAAE,OAAO,YAAY,oBAY7D"}
1
+ {"version":3,"file":"approvals.service.d.ts","sourceRoot":"","sources":["../src/approvals.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAA0B,MAAM,SAAS,CAAC;AAazF,UAAU,oBAAqB,SAAQ,cAAc;IACnD,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAWhF;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,kBAKzE;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAWlF;AAkBD,wBAAsB,eAAe,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAUnF;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,kBAUlF;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,IACrC,KAAK,oBAAoB,EAAE,OAAO,YAAY,oBAY7D"}
package/dist/index.js CHANGED
@@ -113,8 +113,7 @@ function setExecuteResult(id, status, result) {
113
113
  // src/approvals.service.ts
114
114
  async function approvalList(req, reply) {
115
115
  const { status, mine, limit, offset } = req.body ?? {};
116
- const isDeveloper = req.user.role === "developer";
117
- const ownOnly = isDeveloper || String(mine) === "true";
116
+ const ownOnly = req.user.role === "developer" || req.user.role === "maintainer" || String(mine) === "true";
118
117
  const filters = {
119
118
  status,
120
119
  submittedBy: ownOnly ? req.user.id : void 0,
package/dist/index.mjs CHANGED
@@ -79,8 +79,7 @@ function setExecuteResult(id, status, result) {
79
79
  // src/approvals.service.ts
80
80
  async function approvalList(req, reply) {
81
81
  const { status, mine, limit, offset } = req.body ?? {};
82
- const isDeveloper = req.user.role === "developer";
83
- const ownOnly = isDeveloper || String(mine) === "true";
82
+ const ownOnly = req.user.role === "developer" || req.user.role === "maintainer" || String(mine) === "true";
84
83
  const filters = {
85
84
  status,
86
85
  submittedBy: ownOnly ? req.user.id : void 0,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.8.1",
6
+ "version": "0.9.1",
7
7
  "description": "DMS approval workflow domain logic: service, model, sql",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@heyhru/business-dms-audit": "0.6.2",
30
- "@heyhru/business-dms-datasource": "0.8.1",
30
+ "@heyhru/business-dms-datasource": "0.8.2",
31
31
  "@heyhru/server-plugin-pg": "0.7.0",
32
32
  "fastify": "^5.8.4"
33
33
  },
@@ -36,5 +36,5 @@
36
36
  "typescript": "^6.0.2",
37
37
  "vitest": "^4.1.4"
38
38
  },
39
- "gitHead": "ba1108598de594155e02b0800796d13a4e7b7449"
39
+ "gitHead": "f6013af87a27c9ad96b0e078760bd7b3d9832730"
40
40
  }