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

Cannot create a group into Plone when groups enabled with pas.plugins.ldap #94

Open
glemignot opened this issue Feb 4, 2020 · 0 comments
Labels

Comments

@glemignot
Copy link

Hello,

I've a Plone 5.2 instance with Zope 4.0/Python 3.7, on which pas.plugins.ldap is installed.

When the "Group_Introspection (getGroupById)" plugin is activated, the "create group" (@@usergroup-groupdetails) does an error :

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 155, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 337, in publish_module
  Module ZPublisher.WSGIPublisher, line 255, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 61, in call_object
  Module Products.CMFPlone.controlpanel.browser.usergroups_groupdetails, line 27, in __call__
  Module Products.PlonePAS.tools.groups, line 223, in getGroupById
  Module Products.PlonePAS.pas, line 229, in getGroup
  Module pas.plugins.ldap.plugin, line 656, in getGroupById
AttributeError: 'NoneType' object has no attribute 'decode'

After a quick reading of the code, it seems that the "create group" popup is the same than the "properties" tab of an existing group, and therefore it tries to get info on the group, calling getGroupById, but with an id of None since we are about to create a new group.

The pas.plugins.ldap code then fails to handle the None group id.

I guess the getGroupById method of pas.plugins.ldap.plugin should just return None if called with None as an argument.

Regards,

@jensens jensens added the bug label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants