From 80f1de27de0c1a93cc9b07a5ce988cbf96441231 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 27 Sep 2024 09:19:42 +0100 Subject: [PATCH] Please just work tests --- .../server/src/api/routes/tests/permissions.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/server/src/api/routes/tests/permissions.spec.ts b/packages/server/src/api/routes/tests/permissions.spec.ts index 0f059998ae..d2df14d7af 100644 --- a/packages/server/src/api/routes/tests/permissions.spec.ts +++ b/packages/server/src/api/routes/tests/permissions.spec.ts @@ -125,6 +125,12 @@ describe("/permission", () => { }) it("should be able to access the view data when the table is set to public and with no view permissions overrides", async () => { + // Make view inherit table permissions + await config.api.permission.revoke({ + roleId: STD_ROLE_ID, + resourceId: view.id, + level: PermissionLevel.READ, + }) // replicate changes before checking permissions await config.publish() @@ -138,6 +144,12 @@ describe("/permission", () => { resourceId: table._id, level: PermissionLevel.READ, }) + // Make view inherit table permissions + await config.api.permission.revoke({ + roleId: STD_ROLE_ID, + resourceId: view.id, + level: PermissionLevel.READ, + }) // replicate changes before checking permissions await config.publish()