Fix tests
This commit is contained in:
parent
9f84262940
commit
aa0a1737c8
|
@ -1,7 +1,6 @@
|
|||
import { permissions, roles, context } from "@budibase/backend-core"
|
||||
import {
|
||||
UserCtx,
|
||||
Role,
|
||||
GetResourcePermsResponse,
|
||||
ResourcePermissionInfo,
|
||||
GetDependantResourcesResponse,
|
||||
|
|
|
@ -92,7 +92,7 @@ describe("/permission", () => {
|
|||
})
|
||||
})
|
||||
|
||||
it.only("should get resource permissions with multiple roles", async () => {
|
||||
it("should get resource permissions with multiple roles", async () => {
|
||||
perms = await config.api.permission.add({
|
||||
roleId: HIGHER_ROLE_ID,
|
||||
resourceId: table._id!,
|
||||
|
@ -102,7 +102,6 @@ describe("/permission", () => {
|
|||
expect(permissions).toEqual({
|
||||
read: { permissionType: "EXPLICIT", role: STD_ROLE_ID },
|
||||
write: { permissionType: "EXPLICIT", role: HIGHER_ROLE_ID },
|
||||
execute: { permissionType: "BASE", role: "BASIC" },
|
||||
})
|
||||
|
||||
const all = await config.api.permission.fetch()
|
||||
|
|
|
@ -19,6 +19,7 @@ export function getPermissionType(resourceId: string) {
|
|||
switch (docType) {
|
||||
case DocumentType.TABLE:
|
||||
case DocumentType.ROW:
|
||||
return permissions.PermissionType.TABLE
|
||||
case DocumentType.AUTOMATION:
|
||||
return permissions.PermissionType.AUTOMATION
|
||||
case DocumentType.WEBHOOK:
|
||||
|
|
Loading…
Reference in New Issue