@budibase/worker 2.21.8 → 2.21.9

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.21.8",
4
+ "version": "2.21.9",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "author": "Budibase",
38
38
  "license": "GPL-3.0",
39
39
  "dependencies": {
40
- "@budibase/backend-core": "2.21.8",
41
- "@budibase/pro": "2.21.8",
42
- "@budibase/string-templates": "2.21.8",
43
- "@budibase/types": "2.21.8",
40
+ "@budibase/backend-core": "2.21.9",
41
+ "@budibase/pro": "2.21.9",
42
+ "@budibase/string-templates": "2.21.9",
43
+ "@budibase/types": "2.21.9",
44
44
  "@koa/router": "8.0.8",
45
45
  "@techpass/passport-openidconnect": "0.3.2",
46
46
  "@types/global-agent": "2.1.1",
@@ -108,5 +108,5 @@
108
108
  }
109
109
  }
110
110
  },
111
- "gitHead": "f2541bd150fcb84cd403e29a759843b2952563a4"
111
+ "gitHead": "901d6ae4116d0199b2a68e5be38c8dc5658b48e7"
112
112
  }
@@ -2,6 +2,7 @@ import tk from "timekeeper"
2
2
  import _ from "lodash"
3
3
  import { generator, mocks, structures } from "@budibase/backend-core/tests"
4
4
  import {
5
+ CloudAccount,
5
6
  ScimCreateUserRequest,
6
7
  ScimGroupResponse,
7
8
  ScimUpdateRequest,
@@ -604,6 +605,25 @@ describe("scim", () => {
604
605
 
605
606
  expect(events.user.deleted).toBeCalledTimes(1)
606
607
  })
608
+
609
+ it("an account holder cannot be removed even when synched", async () => {
610
+ const account: CloudAccount = {
611
+ ...structures.accounts.account(),
612
+ budibaseUserId: user.id,
613
+ email: user.emails![0].value,
614
+ }
615
+ mocks.accounts.getAccount.mockResolvedValue(account)
616
+
617
+ await deleteScimUser(user.id, {
618
+ expect: {
619
+ message: "Account holder cannot be deleted",
620
+ status: 400,
621
+ error: { code: "http" },
622
+ },
623
+ })
624
+
625
+ await config.api.scimUsersAPI.find(user.id, { expect: 200 })
626
+ })
607
627
  })
608
628
  })
609
629
 
@@ -1,13 +1,17 @@
1
1
  import TestConfiguration from "../../TestConfiguration"
2
2
  import { TestAPI } from "../base"
3
3
 
4
- const defaultConfig = {
4
+ const defaultConfig: RequestSettings = {
5
5
  expect: 200,
6
6
  setHeaders: true,
7
7
  skipContentTypeCheck: false,
8
8
  }
9
9
 
10
- export type RequestSettings = typeof defaultConfig
10
+ export type RequestSettings = {
11
+ expect: number | object
12
+ setHeaders: boolean
13
+ skipContentTypeCheck: boolean
14
+ }
11
15
 
12
16
  export abstract class ScimTestAPI extends TestAPI {
13
17
  constructor(config: TestConfiguration) {