collective/Products.PloneLDAP — pull request #2 by adaugherity (2014-09-18 01:30:33+00:00)
Title: Fix role assignment -- only complain in updateGroup() when necesssary.

This fixes role assignment via the Plone Users and Groups control panel,
which calls updateGroup() before actually setting roles (role setting is done
by portal_role_manager and doesn't concern us). If we don't get any non-None
arguments, don't raise an exception.

Attempting to set group properties (title, description, email) from Plone
will pass in actual values (or an empty string, but not None) and in that case
the exception is still appropriately raised.

Perhaps Plone shouldn't be calling this (the caller is
Products.PlonePAS.tools.groups.editGroup(); for role assignment it does
not have title or description in its **kw, and thus ends up calling
updateGroup(id, title=None, description=None)), but working around it here is
easy enough.