From d98e1468a27fafde5b080c0b0ce02696ce4a589d Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 9 Jan 2025 10:55:04 +0100 Subject: [PATCH] Fix missing access in the laboratory mocked endpoint (#6262) --- .changeset/five-yaks-type.md | 5 +++++ .../api/src/modules/auth/lib/target-access-token-strategy.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/five-yaks-type.md diff --git a/.changeset/five-yaks-type.md b/.changeset/five-yaks-type.md new file mode 100644 index 000000000..49728f23e --- /dev/null +++ b/.changeset/five-yaks-type.md @@ -0,0 +1,5 @@ +--- +'hive': patch +--- + +Resolve the issue where the laboratory mocked endpoint consistently returns: "Please publish your first schema to Hive." diff --git a/packages/services/api/src/modules/auth/lib/target-access-token-strategy.ts b/packages/services/api/src/modules/auth/lib/target-access-token-strategy.ts index 592d66b1a..a36532a3f 100644 --- a/packages/services/api/src/modules/auth/lib/target-access-token-strategy.ts +++ b/packages/services/api/src/modules/auth/lib/target-access-token-strategy.ts @@ -166,7 +166,7 @@ function transformAccessTokenLegacyScopes(args: { }, { effect: 'allow', - action: ['organization:describe', 'project:describe'], + action: ['organization:describe', 'project:describe', 'laboratory:describe'], resource: [`hrn:${args.organizationId}:organization/${args.organizationId}`], }, );