Private Content (BrowserView Form) to anonymous User

Hello,

I would appreciate some support for brainstorming and idea generation.

How can I display "private" content to anonymous visitors or allow them to send/save forms (possibly via a token)?

Background: We are using a recruiting software, which, however, should not be publicly available on the internet.

Currently, in addition to normal applications, we also want to enable job postings and applications through an application form, which should NOT be published.

And here, I am out of ideas for implementation. Using a temporary newSecurityManager, it's possible to view the application form (BrowserView of the private posting), but not to save it! Also, ideally, the "Edit-Toolbar" should not be visible...

I'm grateful for any help and ideas!

Private is private, point. Your prerequisite is wrong. Use a custom form and create the application or posting (your contenttype?) via plone.api with a temporary new security manager. Or create a custom workflow.

2 Likes

plone.api.env.adopt_roles or plone.api.env.adopt_user might come in handy. These are higher level than create a new security manager.

1 Like

Thank you, that's actually a much better approach! But I clearly didn't think that far...

I have now created a second BrowserView that extends the original and uses api.env.adopt_user to generate the desired content.

Thank you very much.