Fix build
This commit is contained in:
parent
e4feb64fe5
commit
27a5123855
|
@ -1,5 +1,6 @@
|
|||
const { roles, events, permissions } = require("@budibase/backend-core")
|
||||
const setup = require("./utilities")
|
||||
const { PermissionLevel } = require("@budibase/types")
|
||||
const { basicRole } = setup.structures
|
||||
const { BUILTIN_ROLE_IDS } = roles
|
||||
const { BuiltinPermissionID } = permissions
|
||||
|
@ -16,7 +17,7 @@ describe("/roles", () => {
|
|||
|
||||
const createRole = async (role) => {
|
||||
if (!role) {
|
||||
role = basicRole()
|
||||
role = basicRole()
|
||||
}
|
||||
|
||||
return request
|
||||
|
@ -98,7 +99,7 @@ describe("/roles", () => {
|
|||
|
||||
it("should be able to get the role with a permission added", async () => {
|
||||
const table = await config.createTable()
|
||||
await config.addPermission(BUILTIN_ROLE_IDS.POWER, table._id)
|
||||
await config.api.permission.set({ roleId: BUILTIN_ROLE_IDS.POWER, resourceId: table._id, level: PermissionLevel.READ })
|
||||
const res = await request
|
||||
.get(`/api/roles`)
|
||||
.set(config.defaultHeaders())
|
||||
|
|
Loading…
Reference in New Issue