fix: show shared folder contents consistently
All checks were successful
CI / hygiene (push) Successful in 2s
Build and Deploy / build-and-deploy (push) Successful in 29s
CI / test (push) Successful in 19s

This commit is contained in:
Grendgi
2026-06-16 13:45:15 +03:00
parent facdba7f0b
commit f12487d036

View File

@@ -51,7 +51,10 @@ func (r *NodeRepository) List(ctx context.Context, userID string, subordinateIDs
switch scope {
case "shared":
where = append(where, `n.owner_user_id <> $1 AND (
if parentID == nil || *parentID == "" {
where = append(where, "n.owner_user_id <> $1")
}
where = append(where, `(
has_node_access(n.id, $1)
OR n.owner_user_id::text = ANY($2::text[])
)`)