Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portal_actions / object / history wrong permission raises Forbidden in Volto Frontend #4059

Open
avoinea opened this issue Nov 11, 2024 · 1 comment

Comments

@avoinea
Copy link
Member

avoinea commented Nov 11, 2024

It should be CMFEditions: Access previous versions

<object meta_type="CMF Action"
name="history"
i18n:domain="plone"
>
<property name="title"
i18n:translate=""
>History</property>
<property name="description"
i18n:translate=""
/>
<property name="url_expr">string:${object_url}/@@historyview</property>
<property name="link_target" />
<property name="icon_expr">string:toolbar-action/history</property>
<property name="available_expr" />
<property name="permissions">
<element value="Modify portal content" />
</property>
<property name="visible">True</property>
</object>

This is used by Volto Frontend, and while the history menu is visible, when clicking on it by a user that doesn't have Modify portal content on object, the forbidden is raised.

See:

https://github.com/plone/plone.restapi/blob/4f3bb4f1c656295f609a9aaea4540325d1b55b8e/src/plone/restapi/services/history/configure.zcml#L9-L15

And also:

https://github.com/plone/plone.app.layout/blob/1c7334194ec5eb9e57f5306bfd5e227b0b78a294/plone/app/layout/viewlets/content.py#L444-L445

And Volto:

https://github.com/plone/volto/blob/157df05e5da7cc4349f2fefaa6e3566da56a8213/packages/volto/src/components/manage/History/History.jsx#L152-L160

@davisagli
Copy link
Member

I agree. Also probably worth fixing in an upgrade step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants