From 9d89445411444c49ee21685572d8dbdfd21fc8c2 Mon Sep 17 00:00:00 2001 From: Jay Quan Date: Tue, 21 Nov 2023 15:15:49 +0100 Subject: [PATCH] fix: DatasetLifecycle test fix --- src/casl/casl-ability.factory.ts | 4 ++-- test/DatasetLifecycle.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/casl/casl-ability.factory.ts b/src/casl/casl-ability.factory.ts index 477714fac..7b717f6f5 100644 --- a/src/casl/casl-ability.factory.ts +++ b/src/casl/casl-ability.factory.ts @@ -1017,8 +1017,8 @@ export class CaslAbilityFactory { // ------------------------------------- // policies can(Action.Update, Policy); - can(Action.Delete, Policy); - can(Action.Manage, Policy); + can(Action.Read, Policy); + can(Action.Create, Policy); } else if ( user.currentGroups.some((g) => configuration().createDatasetPrivilegedGroups.includes(g), diff --git a/test/DatasetLifecycle.js b/test/DatasetLifecycle.js index 2d30c95fa..4c233a61f 100644 --- a/test/DatasetLifecycle.js +++ b/test/DatasetLifecycle.js @@ -284,7 +284,7 @@ describe("DatasetLifecycle: Test facet and filter queries", () => { await request(appUrl) .delete("/api/v3/policies/" + item) .set("Accept", "application/json") - .set({ Authorization: `Bearer ${accessTokenIngestor}` }) + .set({ Authorization: `Bearer ${accessTokenArchiveManager}` }) .expect(200); } });