From b53bc5dfafde52441c691e0c4e7ce50bc4e4f149 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 27 Sep 2024 09:08:38 +0100 Subject: [PATCH] Update tests --- packages/server/src/api/routes/tests/rowAction.spec.ts | 2 +- packages/server/src/api/routes/tests/viewV2.spec.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/routes/tests/rowAction.spec.ts b/packages/server/src/api/routes/tests/rowAction.spec.ts index efd28eb92f..4fe248984a 100644 --- a/packages/server/src/api/routes/tests/rowAction.spec.ts +++ b/packages/server/src/api/routes/tests/rowAction.spec.ts @@ -835,9 +835,9 @@ describe("/rowsActions", () => { // Delete explicit view permissions so they inherit table permissions await config.api.permission.revoke({ + roleId: roles.BUILTIN_ROLE_IDS.PUBLIC, // Don't think this matters since we are revoking the permission level: PermissionLevel.READ, resourceId: viewId, - roleId: "inherited", }) return { permissionResource: tableId, triggerResouce: viewId } diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index c4a39ae8a9..e727f952e5 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -2248,6 +2248,11 @@ describe.each([ level: PermissionLevel.READ, resourceId: table._id!, }) + await config.api.permission.revoke({ + roleId: roles.BUILTIN_ROLE_IDS.PUBLIC, // Don't think this matters since we are revoking the permission + level: PermissionLevel.READ, + resourceId: view.id, + }) await config.publish() const response = await config.api.viewV2.publicSearch(view.id)