@budibase/worker 2.4.42-alpha.3 → 2.4.42-alpha.5

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.4.42-alpha.3",
4
+ "version": "2.4.42-alpha.5",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "author": "Budibase",
37
37
  "license": "GPL-3.0",
38
38
  "dependencies": {
39
- "@budibase/backend-core": "2.4.42-alpha.3",
40
- "@budibase/pro": "2.4.42-alpha.2",
41
- "@budibase/string-templates": "2.4.42-alpha.3",
42
- "@budibase/types": "2.4.42-alpha.3",
39
+ "@budibase/backend-core": "2.4.42-alpha.5",
40
+ "@budibase/pro": "2.4.42-alpha.4",
41
+ "@budibase/string-templates": "2.4.42-alpha.5",
42
+ "@budibase/types": "2.4.42-alpha.5",
43
43
  "@koa/router": "8.0.8",
44
44
  "@sentry/node": "6.17.7",
45
45
  "@techpass/passport-openidconnect": "0.3.2",
@@ -101,5 +101,5 @@
101
101
  "typescript": "4.7.3",
102
102
  "update-dotenv": "1.1.1"
103
103
  },
104
- "gitHead": "5006a702b8e93afa9b5b11084cec28da6bdc22f8"
104
+ "gitHead": "9d4cf0848f406553056f1ec1eba0a38c72551c14"
105
105
  }
@@ -50,11 +50,6 @@ async function passportCallback(
50
50
  setCookie(ctx, token, Cookie.Auth, { sign: false })
51
51
  // set the token in a header as well for APIs
52
52
  ctx.set(Header.TOKEN, token)
53
- // get rid of any app cookies on login
54
- // have to check test because this breaks cypress
55
- if (!env.isTest()) {
56
- clearCookie(ctx, Cookie.CurrentApp)
57
- }
58
53
  }
59
54
 
60
55
  export const login = async (ctx: Ctx<LoginRequest>, next: any) => {
@@ -2,7 +2,6 @@ import * as userSdk from "../../../sdk/users"
2
2
  import {
3
3
  featureFlags,
4
4
  tenancy,
5
- constants,
6
5
  db as dbCore,
7
6
  utils,
8
7
  encryption,
@@ -11,7 +10,7 @@ import {
11
10
  import env from "../../../environment"
12
11
  import { groups } from "@budibase/pro"
13
12
  import { UpdateSelfRequest, UpdateSelfResponse, UserCtx } from "@budibase/types"
14
- const { getCookie, clearCookie, newid } = utils
13
+ const { newid } = utils
15
14
 
16
15
  function newTestApiKey() {
17
16
  return env.ENCRYPTED_TEST_PUBLIC_API_KEY
@@ -71,16 +70,6 @@ export async function fetchAPIKey(ctx: any) {
71
70
  ctx.body = cleanupDevInfo(devInfo)
72
71
  }
73
72
 
74
- const checkCurrentApp = (ctx: any) => {
75
- const appCookie = getCookie(ctx, constants.Cookie.CurrentApp)
76
- if (appCookie && !tenancy.isUserInAppTenant(appCookie.appId)) {
77
- // there is a currentapp cookie from another tenant
78
- // remove the cookie as this is incompatible with the builder
79
- // due to builder and admin permissions being removed
80
- clearCookie(ctx, constants.Cookie.CurrentApp)
81
- }
82
- }
83
-
84
73
  /**
85
74
  * Add the attributes that are session based to the current user.
86
75
  */
@@ -101,8 +90,6 @@ export async function getSelf(ctx: any) {
101
90
  id: userId,
102
91
  }
103
92
 
104
- checkCurrentApp(ctx)
105
-
106
93
  // get the main body of the user
107
94
  const user = await userSdk.getUser(userId)
108
95
  ctx.body = await groups.enrichUserRolesFromGroups(user)