You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom PAS-plugin that implements interface ILocalRolesPlugin. To my surprise, this plugin breaks api.user.get_roles. Most of the time it works, but when I call the function like this:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/bvderbau/Projects/plone5.2-pcm2052-emptysharing/tryout.py", line 21, in <module>
roles = api.user.get_roles(username=username, obj=obj, inherit=False)
File "<decorator-gen-35>", line 2, in get_roles
File "/home/bvderbau/.buildout/eggs/cp36m/plone.api-1.10.4-py3.6.egg/plone/api/validation.py", line 116, in wrapped
return function(*args, **kwargs)
File "/home/bvderbau/.buildout/eggs/cp36m/plone.api-1.10.4-py3.6.egg/plone/api/user.py", line 258, in get_roles
for adapter in lrmanager._getAdapters(obj):
AttributeError: _getAdapters
It seems the problem is that my plugin is missing the method _getAdapters. This method is not required by the ILocalRolesPlugin interface. The only local roles plugin that has this method is in package borg.localrole. Are we supposed to use borg.localrole to assign local roles?
The text was updated successfully, but these errors were encountered:
I have a custom PAS-plugin that implements interface
ILocalRolesPlugin
. To my surprise, this plugin breaksapi.user.get_roles
. Most of the time it works, but when I call the function like this:I get the following exception:
It seems the problem is that my plugin is missing the method
_getAdapters
. This method is not required by theILocalRolesPlugin
interface. The only local roles plugin that has this method is in packageborg.localrole
. Are we supposed to useborg.localrole
to assign local roles?The text was updated successfully, but these errors were encountered: