collective / collective/collective.subscribablesections
Access unauthorized in this context
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Problem:**
When access to a folder flagged as **Closed Section** with an user with **Member** role and _without having approved his access request_, in the Zope console show the following error:
``` python
2013-02-15 22:11:00 ERROR portlets Error while determining renderer availability of portlet ('context' '/Plone' u'collective.subscribablesections.Requests'): You are not allowed to access 'acme-company' in this context
Traceback (most recent call last):
File "/home/macagua/.buildout/eggs/plone.portlets-2.1-py2.7.egg/plone/portlets/manager.py", line 117, in _lazyLoadPortlets
isAvailable = renderer.available
File "/home/macagua/proyectos/plone/git/collective.subscribablesections_bnk/collective/subscribablesections/portlets/requests.py", line 56, in available
return not self.anonymous and len(self._data())
File "/home/macagua/proyectos/plone/git/collective.subscribablesections_bnk/collective/subscribablesections/portlets/requests.py", line 86, in _data
section = brain.getObject()
File "/home/macagua/.buildout/eggs/Products.ZCatalog-2.13.23-py2.7.egg/Products/ZCatalog/CatalogBrains.py", line 102, in getObject
return parent.restrictedTraverse(path[-1])
File "/home/macagua/.buildout/eggs/Zope2-2.13.19-py2.7.egg/OFS/Traversable.py", line 317, in restrictedTraverse
return self.unrestrictedTraverse(path, default, restricted=True)
File "/home/macagua/.buildout/eggs/Zope2-2.13.19-py2.7.egg/OFS/Traversable.py", line 244, in unrestrictedTraverse
raise Unauthorized(name)
Unauthorized: You are not allowed to access 'acme-company' in this context
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in collective/subscribablesections/portlets/requests.py, especially the available method and _data at the locations shown in the traceback. Reproduce the Closed Section scenario with a Member whose access request is not approved, then determine the expected handling for the inaccessible section; done should avoid the Unauthorized error in the portlet log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100