@heyhru/app-dms-server 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ var PERMISSIONS = {
55
55
  "POST /datasources/delete": { auth: true, roles: ["admin"] },
56
56
  // SQL
57
57
  "POST /sql/parse": { auth: true },
58
- "POST /sql/execute": { auth: true, roles: ["admin", "maintainer", "developer"] },
58
+ "POST /sql/execute": { auth: true, roles: ["admin", "maintainer", "developer", "viewer"] },
59
59
  "POST /sql/databases": { auth: true },
60
60
  "POST /sql/tables": { auth: true },
61
61
  // Approvals
@@ -616,7 +616,7 @@ async function approvalExecute(req, reply) {
616
616
  }
617
617
  async function doExecuteApproval(id, userId, ip, log) {
618
618
  const approval = await getApprovalById(id);
619
- if (!approval || approval["status"] !== "approved") {
619
+ if (!approval || !["approved", "execute_failed"].includes(approval["status"])) {
620
620
  throw new Error("\u5BA1\u6279\u8BB0\u5F55\u4E0D\u5B58\u5728\u6216\u672A\u901A\u8FC7\u5BA1\u6279");
621
621
  }
622
622
  await setExecuting(id);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.3",
6
+ "version": "0.3.4",
7
7
  "description": "DMS backend API server built on Fastify",
8
8
  "type": "module",
9
9
  "main": "./dist/index.mjs",
@@ -36,5 +36,5 @@
36
36
  "typescript": "^6.0.2",
37
37
  "vitest": "^4.1.2"
38
38
  },
39
- "gitHead": "446a4f13523ab96b43eb8292c301a1694dff2ed8"
39
+ "gitHead": "df5a2e9fb6be05385754a7942b0645b4648e10a2"
40
40
  }