Skip to content

Bugfix: add ability for view only users to interact with preview page and view data in inspector - #4152

Open
t-heuser wants to merge 1 commit into
neos:8.4from
t-heuser:bugfix/add-ability-for-view_only-users-to-interact-with-preview-page-and-view-data-in-inspector
Open

t-heuser wants to merge 1 commit into
neos:8.4from
t-heuser:bugfix/add-ability-for-view_only-users-to-interact-with-preview-page-and-view-data-in-inspector

Conversation

@t-heuser

@t-heuser t-heuser commented Jul 8, 2026

Copy link
Copy Markdown

This is the successor of #3921. It contains the bugfix and implements all remarks from the comments of the original PR.

What I did
Previous Behaviour:

  • When a view-only user clicks on a node on the preview page nothing happens.
  • The user can only select nodes via the content tree (left sidebar)
  • The user can not see any node data in the inspector (right sidebar)

Fixed Behaviour:

  • The user can interact with nodes on the preview page (highlighting is visible)
  • The user can view - but not edit - node data in the inspector (right sidebar)

How I did it

  • Backend: gate rendering on read permission instead of edit permission — added a canReadProperties check (based on ReadNodePrivilege) to NodePolicyService, exposed it in the node policy data, and switched AugmentationAspect to use it so content metadata is still rendered for view-only users.
  • Frontend: don't boot inline editors for content the user can't edit — initializePropertyDomNode.js skips editor initialization when the workspace is read-only or the (lazy-loaded, awaited via store subscription) node policy disallows editing, replacing the old approach of blocking the whole guest frame / read-only CKEditor instances, so view-only users can interact with the preview page normally.
  • Inspector: show node data read-only — tab/property visibility now checks canReadProperties instead of canEdit, and InspectorEditorEnvelope disables editors when the node policy has canEdit: false, letting view-only users see values without editing them.

How to verify it

  • Create a role (e.g. with the Sandstorm.NeosAcl package) that has permission to view but not to edit/create.
  • When browsing content the user should be able to click on nodes in the preview page and see their data in the inspector.

BEFORE
Screenshot before change
AFTER
Screenshot after change

@mhsdesign

Copy link
Copy Markdown
Member

Hi thanks ill need to find some time to retest this. It seems everything is in one commit so i cannot judge by reading whats new ... but maybe thats not a problem:)

@t-heuser

t-heuser commented Jul 8, 2026

Copy link
Copy Markdown
Author

@mhsdesign Almost everything in the JS files changed, the PHP part stayed the same :)

@t-heuser

Copy link
Copy Markdown
Author

@mhsdesign Any updates? :)

@mhsdesign
mhsdesign requested a review from Sebobo August 24, 2026 14:05
@mhsdesign

Copy link
Copy Markdown
Member

Nope im still occupied with the 9.2 release. But i wonder, the original pr from robert did not look that bad and i did understood it last time i reviewed ^^ i dont understand the transition from his javascript code changes to this fully new approach - im missing that diff^^ - why this is the successor. Here are also some oddities we have never used before like store.subscribe() so thats definitely a sign that something is not really right here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.4 Bug Label to mark the change as bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants