Display "Not shared" indicator for RLS-restricted relation fields (#17713)

## Context
Previously, if for example a Person had a companyId but the company
relation was null due to RLS, the company column appeared empty. Now it
displays ForbiddenFieldDisplay to indicate the relation exists but is
inaccessible.

When RLS restricts access to a related record, the frontend now shows a
"Not shared" indicator (with lock icon) instead of an empty field.

<img width="1275" height="399" alt="Screenshot 2026-02-04 at 15 37 53"
src="https://github.com/user-attachments/assets/870306f8-f811-4dc0-b23b-a33e89043a37"
/>
This commit is contained in:
Weiko
2026-02-04 17:49:39 +01:00
committed by GitHub
parent 96c37b30c5
commit 8674cf973e
5 changed files with 38 additions and 5 deletions
@@ -417,9 +417,6 @@ export class ProcessNestedRelationsV2Helper {
(rel) => rel[joinField] === item.id,
);
} else {
if (relationResults.length === 0) {
item[`${sourceFieldName}Id`] = null;
}
item[sourceFieldName] =
relationResults.find(
(rel) => rel.id === item[`${sourceFieldName}Id`],