Skip to content

Commit 6aa0db0

Browse files
committed
fix collaborator security query
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
1 parent afe85b9 commit 6aa0db0

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

packages/postgres/CHANGELOG.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
22
"name": "@hcengineering/postgres",
33
"entries": [
4+
{
5+
"version": "0.7.21",
6+
"tag": "@hcengineering/postgres_v0.7.21",
7+
"date": "Tue, 02 Dec 2025 04:08:02 GMT",
8+
"comments": {
9+
"patch": [
10+
{
11+
"comment": "fix collaborator security query"
12+
}
13+
]
14+
}
15+
},
416
{
517
"version": "0.7.20",
618
"tag": "@hcengineering/postgres_v0.7.20",

packages/postgres/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log - @hcengineering/postgres
22

3-
This log was last generated on Wed, 26 Nov 2025 16:04:43 GMT and should not be manually modified.
3+
This log was last generated on Tue, 02 Dec 2025 04:08:02 GMT and should not be manually modified.
4+
5+
## 0.7.21
6+
Tue, 02 Dec 2025 04:08:02 GMT
7+
8+
### Patches
9+
10+
- fix collaborator security query
411

512
## 0.7.20
613
Wed, 26 Nov 2025 16:04:43 GMT

packages/postgres/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hcengineering/postgres",
3-
"version": "0.7.20",
3+
"version": "0.7.21",
44
"main": "lib/index.js",
55
"svelte": "src/index.ts",
66
"types": "types/index.d.ts",

packages/postgres/src/storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
640640
const collabSec = getClassCollaborators(this.modelDb, this.hierarchy, _class)
641641
if (collabSec?.provideSecurity === true && [AccountRole.Guest, AccountRole.ReadOnlyGuest].includes(acc.role)) {
642642
const collab = `OR EXISTS (SELECT 1 FROM ${translateDomain(DOMAIN_COLLABORATOR)} collab_sec WHERE collab_sec."workspaceId" = ${vars.add(this.workspaceId, '::uuid')} AND collab_sec."attachedTo" = ${domain}._id AND collab_sec.collaborator = '${acc.uuid}')`
643-
return `AND (${res} + ${collab})`
643+
return `AND (${res} ${collab})`
644644
}
645645
return `AND (${res})`
646646
}

0 commit comments

Comments
 (0)