api.group.get_roles() fails with AutoGroup
Open
Nobody has claimed this yet.
01 type: bug
- Dominant language
- Python
- Stars
- 101
- Forks
- 62
- Avg merge
- 15h 15m
- Merged PRs (30d)
- 1
Description
getting local roles fails for the AutoGroup 'AuthenticatedUsers' :
Error in test test_local_roles_without_inheritance_for_builtin_groups (plone.api.tests.test_group.TestPloneApiGroup)
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 398, in debug
getattr(self, self._testMethodName)()
File "/Users/philip/workspace/kbo/src-mrd/plone.api/src/plone/api/tests/test_group.py", line 574, in test_local_roles_without_inheritance_for_builtin_groups
api.group.get_roles(groupname='AuthenticatedUsers', obj=folder, inherit=False)
File "<decorator-gen-53>", line 2, in get_roles
File "/Users/philip/workspace/kbo/src-mrd/plone.api/src/plone/api/validation.py", line 100, in wrapped
return f(*args, **kwargs)
File "<decorator-gen-52>", line 2, in get_roles
File "/Users/philip/workspace/kbo/src-mrd/plone.api/src/plone/api/validation.py", line 131, in wrapped
return f(*args, **kwargs)
File "/Users/philip/workspace/kbo/src-mrd/plone.api/src/plone/api/group.py", line 235, in get_roles
lrmanagers = plone_user._getLocalRolesPlugins()
AttributeError: 'super' object has no attribute '_getLocalRolesPlugins'
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.
Research direction
Start with plone/api/group.py at get_roles and the failing test test_local_roles_without_inheritance_for_builtin_groups in plone/api/tests/test_group.py. Reproduce the AuthenticatedUsers case with inherit=False and trace the reported _getLocalRolesPlugins failure. Done means the test passes and get_roles returns local roles without that exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authorization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100