From 51e09ddf7b2c2d0274cd2b4a503a375993505f1d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 23 Sep 2024 10:08:21 +0100 Subject: [PATCH] Update row action tests to revoke explicit view permissions when testing triggering against views --- packages/server/src/api/routes/tests/rowAction.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/server/src/api/routes/tests/rowAction.spec.ts b/packages/server/src/api/routes/tests/rowAction.spec.ts index ef7d2afbba..efd28eb92f 100644 --- a/packages/server/src/api/routes/tests/rowAction.spec.ts +++ b/packages/server/src/api/routes/tests/rowAction.spec.ts @@ -826,11 +826,20 @@ describe("/rowsActions", () => { ) ).id + // Allow row action on view await config.api.rowAction.setViewPermission( tableId, viewId, rowAction.id ) + + // Delete explicit view permissions so they inherit table permissions + await config.api.permission.revoke({ + level: PermissionLevel.READ, + resourceId: viewId, + roleId: "inherited", + }) + return { permissionResource: tableId, triggerResouce: viewId } }, ],