From 3f7a503bfadcb4131580e46f4774b807a66f900d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 22 Mar 2026 09:43:55 +0100 Subject: [PATCH] Bugfix/add missing guard in hasReadRestrictedAccessPermission() (#6569) * Add missing guard in hasReadRestrictedAccessPermission() * Update changelog --- CHANGELOG.md | 4 ++++ libs/common/src/lib/permissions.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 338b67f96..46beae7ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for Polish (`pl`) - Upgraded `@trivago/prettier-plugin-sort-imports` from version `5.2.2` to `6.0.2` +### Fixed + +- Fixed an issue by adding a missing guard in the public access for portfolio sharing + ## 2.250.0 - 2026-03-17 ### Added diff --git a/libs/common/src/lib/permissions.ts b/libs/common/src/lib/permissions.ts index a70e61bac..f9cb19562 100644 --- a/libs/common/src/lib/permissions.ts +++ b/libs/common/src/lib/permissions.ts @@ -195,7 +195,7 @@ export function hasReadRestrictedAccessPermission({ return false; } - const access = user.accessesGet?.find(({ id }) => { + const access = user?.accessesGet?.find(({ id }) => { return id === impersonationId; });