@budibase/worker 3.12.10 → 3.12.11
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": "3.12.
|
|
4
|
+
"version": "3.12.11",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "b5eea4bb446eb6d79440b12dfdb5c492c7ec21dc"
|
|
117
117
|
}
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
GenerateAPIKeyRequest,
|
|
16
16
|
GenerateAPIKeyResponse,
|
|
17
17
|
GetGlobalSelfResponse,
|
|
18
|
+
QuotaType,
|
|
19
|
+
QuotaUsageType,
|
|
20
|
+
StaticQuotaName,
|
|
18
21
|
UpdateSelfRequest,
|
|
19
22
|
UpdateSelfResponse,
|
|
20
23
|
User,
|
|
@@ -86,12 +89,12 @@ export async function fetchAPIKey(ctx: UserCtx<void, FetchAPIKeyResponse>) {
|
|
|
86
89
|
/**
|
|
87
90
|
*
|
|
88
91
|
*/
|
|
89
|
-
const getUserSessionAttributes = (ctx:
|
|
92
|
+
const getUserSessionAttributes = (ctx: UserCtx) => ({
|
|
90
93
|
account: ctx.user.account,
|
|
91
|
-
license: ctx.user.license
|
|
94
|
+
license: ctx.user.license!,
|
|
92
95
|
budibaseAccess: !!ctx.user.budibaseAccess,
|
|
93
96
|
accountPortalAccess: !!ctx.user.accountPortalAccess,
|
|
94
|
-
csrfToken: ctx.user.csrfToken
|
|
97
|
+
csrfToken: ctx.user.csrfToken!,
|
|
95
98
|
})
|
|
96
99
|
|
|
97
100
|
export async function getSelf(ctx: UserCtx<void, GetGlobalSelfResponse>) {
|
|
@@ -123,6 +126,13 @@ export async function getSelf(ctx: UserCtx<void, GetGlobalSelfResponse>) {
|
|
|
123
126
|
}
|
|
124
127
|
: undefined
|
|
125
128
|
|
|
129
|
+
if (flags?.WORKSPACE_APPS) {
|
|
130
|
+
// TODO: once the flag is clean, we should rename the original object instead
|
|
131
|
+
sessionAttributes.license.quotas[QuotaType.USAGE][QuotaUsageType.STATIC][
|
|
132
|
+
StaticQuotaName.APPS
|
|
133
|
+
].name = "Workspaces"
|
|
134
|
+
}
|
|
135
|
+
|
|
126
136
|
ctx.body = {
|
|
127
137
|
...enrichedUser,
|
|
128
138
|
...sessionAttributes,
|