Error fetching data from a control panel that the user does not have permission in form
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start in src/plone/restapi/serializer/controlpanels/init.py at line 87 and reproduce the GET request to /@controlpanels/security with the Plone Site Setup: Security permission restricted to Manager. Trace the response when self.controlpanel is None; done means the endpoint no longer raises AttributeError for the Site Administrator user.
Written by the indexing model from the issue text.
Description
Describe the bug
I want a user with the Site Administrator role to manage users, but not have access to the security control panel (http://localhost:3000/controlpanel/security). This control panel requires Plone Site Setup: Security permission. So I granted this permission only to Manager. But in Volto, the user management screen needs access to data from this control panel. So when accessing the user management screen with a Site Administrator user, the url http://localhost:3000/@controlpanels/security returns the error:
{
"message": "'SecurityControlpanel' object has no attribute 'title'",
"type": "AttributeError"
}
In the Plone log we have the error:
2025-10-01 15:30:30 ERROR [Zope.SiteErrorLog:35][waitress-0] AttributeError: http://localhost:3000/@controlpanels/security
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 390, in publish_module
Module ZPublisher.WSGIPublisher, line 284, in publish
Module ZPublisher.mapply, line 98, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module plone.rest.service, line 21, in __call__
Module plone.restapi.services, line 19, in render
Module plone.restapi.services.controlpanels.get, line 50, in reply
Module plone.restapi.services.controlpanels.get, line 73, in reply_panel
Module plone.restapi.serializer.controlpanels, line 87, in __call__
AttributeError: 'SecurityControlpanel' object has no attribute 'title'
To Reproduce
Steps to reproduce the behavior:
- In the Plone Site permissions management screen (http://localhost:8080/Plone/manage_access) set the
Plone Site Setup: Securitypermission only for Manager. - Access the user management screen (http://localhost:3000/controlpanel/users) with a Site Administrator user.
Expected behavior
The url http://localhost:3000/@controlpanels/security should not return an error.
Software (please complete the following information):
- OS: [e.g. iOS]
- Browser chrome
- Plone Version 6.1.2
- Volto Version 18.27.2
- Plone REST API Version 9.15.1
Additional context
This error does not occur in Plone Classic.
The error occurs here:
self.controlpanel becomes None, because of the lack of permission. Maybe in this situation, we should set title and group to an empty string?
- Dominant language
- Python
- Stars
- 109
- Forks
- 107
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plone/plone.restapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
plone/plone.restapi#2031 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plone/plone.restapi#662 · 2 comments · 4 reactions ·
-
01 type: bug
plone/plone.restapi#2023 · 1 comment · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
plone/plone.restapi#2017 ·
-
@controlpanels/content-rules/<rule>/action/<idx> omits values for fields in non-default fieldsets Open
plone/plone.restapi#2016 · 1 assignee ·
All issues in plone/plone.restapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100