From b3ad6e7622ccc4199560405a29f0c43280d5ee00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 28 Nov 2023 11:24:17 +0000 Subject: [PATCH] fix: specify permission table (#5448) https://linear.app/unleash/issue/2-1672/hotfix-specify-table-in-permission-column-queries This specifies the table that we are querying the `permission` column from, hopefully preventing ambiguity issues. You can find the relevant changes here: [#5409](https://github.com/Unleash/unleash/pull/5409/files#diff-5cb4eca71e6a03ec3d123986d657368a3386f80e986dfef2e3feb0abb0673d87) --- src/lib/db/access-store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/db/access-store.ts b/src/lib/db/access-store.ts index 70dd784686d0..d928bc65d00f 100644 --- a/src/lib/db/access-store.ts +++ b/src/lib/db/access-store.ts @@ -204,7 +204,7 @@ export class AccessStore implements IAccessStore { let userPermissionQuery = this.db .select( 'project', - 'permission', + 'p.permission', 'environment', 'type', 'ur.role_id', @@ -217,7 +217,7 @@ export class AccessStore implements IAccessStore { userPermissionQuery = userPermissionQuery.union((db) => { db.select( 'project', - 'permission', + 'p.permission', 'environment', 'p.type', 'gr.role_id', @@ -233,7 +233,7 @@ export class AccessStore implements IAccessStore { userPermissionQuery = userPermissionQuery.union((db) => { db.select( this.db.raw("'default' as project"), - 'permission', + 'p.permission', 'environment', 'p.type', 'g.root_role_id as role_id',