@budibase/worker 3.28.1 → 3.28.3

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/package.json +2 -2
  2. package/src/api/index.ts +8 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "3.28.1",
4
+ "version": "3.28.3",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -107,5 +107,5 @@
107
107
  }
108
108
  }
109
109
  },
110
- "gitHead": "e034f570c9fbb13b51fa2178e74764b1c3182761"
110
+ "gitHead": "40bc76dc62aa2c1876e442d464c17aa388630975"
111
111
  }
package/src/api/index.ts CHANGED
@@ -73,6 +73,13 @@ const PUBLIC_ENDPOINTS = [
73
73
  },
74
74
  ]
75
75
 
76
+ const ALLOW_INACTIVE_TENANT_ENDPOINTS = [
77
+ {
78
+ route: "/api/system/tenants/:tenantId",
79
+ method: "DELETE",
80
+ },
81
+ ]
82
+
76
83
  const NO_TENANCY_ENDPOINTS = [
77
84
  // system endpoints are not specific to any tenant
78
85
  {
@@ -150,7 +157,7 @@ router
150
157
  .use("/health", ctx => (ctx.status = 200))
151
158
  .use(auth.buildAuthMiddleware(PUBLIC_ENDPOINTS))
152
159
  .use(auth.buildTenancyMiddleware(PUBLIC_ENDPOINTS, NO_TENANCY_ENDPOINTS))
153
- .use(middleware.activeTenant())
160
+ .use(middleware.activeTenant(ALLOW_INACTIVE_TENANT_ENDPOINTS))
154
161
  .use(auth.buildCsrfMiddleware({ noCsrfPatterns: NO_CSRF_ENDPOINTS }))
155
162
  .use(pro.licensing())
156
163
  // for now no public access is allowed to worker (bar health check)