Skip to content

Commit

Permalink
fix: specify permission table (#5448)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nunogois authored Nov 28, 2023
1 parent 7273e49 commit b3ad6e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/db/access-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class AccessStore implements IAccessStore {
let userPermissionQuery = this.db
.select(
'project',
'permission',
'p.permission',
'environment',
'type',
'ur.role_id',
Expand All @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit b3ad6e7

Please sign in to comment.