@budibase/server 2.7.7-alpha.8 → 2.7.7-alpha.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/dist/automation.js +4 -1
- package/dist/automation.js.map +2 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +2 -2
- package/dist/query.js +4 -1
- package/dist/query.js.map +2 -2
- package/package.json +8 -8
- package/src/api/controllers/role.ts +5 -5
- package/src/api/controllers/routing.ts +3 -3
- package/src/middleware/currentapp.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.7.7-alpha.
|
|
4
|
+
"version": "2.7.7-alpha.9",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"license": "GPL-3.0",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
49
|
-
"@budibase/backend-core": "2.7.7-alpha.
|
|
50
|
-
"@budibase/client": "2.7.7-alpha.
|
|
51
|
-
"@budibase/pro": "2.7.7-alpha.
|
|
52
|
-
"@budibase/shared-core": "2.7.7-alpha.
|
|
53
|
-
"@budibase/string-templates": "2.7.7-alpha.
|
|
54
|
-
"@budibase/types": "2.7.7-alpha.
|
|
49
|
+
"@budibase/backend-core": "2.7.7-alpha.9",
|
|
50
|
+
"@budibase/client": "2.7.7-alpha.9",
|
|
51
|
+
"@budibase/pro": "2.7.7-alpha.9",
|
|
52
|
+
"@budibase/shared-core": "2.7.7-alpha.9",
|
|
53
|
+
"@budibase/string-templates": "2.7.7-alpha.9",
|
|
54
|
+
"@budibase/types": "2.7.7-alpha.9",
|
|
55
55
|
"@bull-board/api": "3.7.0",
|
|
56
56
|
"@bull-board/koa": "3.9.4",
|
|
57
57
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -195,5 +195,5 @@
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
|
-
"gitHead": "
|
|
198
|
+
"gitHead": "31aefecfb14cd5995975c076fa4cbb6be09db535"
|
|
199
199
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getUserMetadataParams,
|
|
5
5
|
InternalTables,
|
|
6
6
|
} from "../../db/utils"
|
|
7
|
-
import {
|
|
7
|
+
import { UserCtx, Database } from "@budibase/types"
|
|
8
8
|
|
|
9
9
|
const UpdateRolesOptions = {
|
|
10
10
|
CREATED: "created",
|
|
@@ -38,15 +38,15 @@ async function updateRolesOnUserTable(
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export async function fetch(ctx:
|
|
41
|
+
export async function fetch(ctx: UserCtx) {
|
|
42
42
|
ctx.body = await roles.getAllRoles()
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export async function find(ctx:
|
|
45
|
+
export async function find(ctx: UserCtx) {
|
|
46
46
|
ctx.body = await roles.getRole(ctx.params.roleId)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export async function save(ctx:
|
|
49
|
+
export async function save(ctx: UserCtx) {
|
|
50
50
|
const db = context.getAppDB()
|
|
51
51
|
let { _id, name, inherits, permissionId } = ctx.request.body
|
|
52
52
|
let isCreate = false
|
|
@@ -72,7 +72,7 @@ export async function save(ctx: BBContext) {
|
|
|
72
72
|
ctx.message = `Role '${role.name}' created successfully.`
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export async function destroy(ctx:
|
|
75
|
+
export async function destroy(ctx: UserCtx) {
|
|
76
76
|
const db = context.getAppDB()
|
|
77
77
|
const roleId = ctx.params.roleId
|
|
78
78
|
const role = await db.get(roleId)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getRoutingInfo } from "../../utilities/routing"
|
|
2
2
|
import { roles } from "@budibase/backend-core"
|
|
3
|
-
import {
|
|
3
|
+
import { UserCtx } from "@budibase/types"
|
|
4
4
|
|
|
5
5
|
const URL_SEPARATOR = "/"
|
|
6
6
|
|
|
@@ -56,11 +56,11 @@ async function getRoutingStructure() {
|
|
|
56
56
|
return { routes: routing.json }
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export async function fetch(ctx:
|
|
59
|
+
export async function fetch(ctx: UserCtx) {
|
|
60
60
|
ctx.body = await getRoutingStructure()
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export async function clientFetch(ctx:
|
|
63
|
+
export async function clientFetch(ctx: UserCtx) {
|
|
64
64
|
const routing = await getRoutingStructure()
|
|
65
65
|
let roleId = ctx.user?.role?._id
|
|
66
66
|
const roleIds = (await roles.getUserRoleHierarchy(roleId, {
|