"Show as" Option for a View under a specific Role

Hi,
Is there a possibility(AddOn or whatever) to change/switch the current View on the Fly to see the Result with a special Role? What i mean is, we have some Roles and the rendered View had some visible/invisble Sections, that is depends on the Role. Some other Systems provides such Option. My only Idea is the change of the CSS Class in the Body-Tag an Hide/Show the relevant Elements. Has anyone experience with such use-case?

CSS switching only works if you send all content to the user regardless of the role, then just "hide" it with CSS. That's completely insecure, obviously, and not how Plone works. To see something from the perspective of another role you'd have to login as a user with that role. Anything else would intrinsically require a complete bypass of the security constraints and open your system to hacking. Which may be an option for other systems, but not for Plone.

I know that this kind of switching is insecure. My Idea is a mix of a "Proxy" Role (AccessControl.SecurityManagement) and call of the View via Adapter. But i do not know if this is the right way. It should only be a "Preview" Option for my Editors.

1 Like

collective.powertoken.view can be a good starting point.
It's a developer targeted add-on and I developed this exactly for a similar requirement.

BTW: all of the @gyst warning are right. I used it in an intranet environment.