collective / pas.plugins.ldap

Zope (and Plone) PAS Plugin providing users and groups from LDAP directory
http://pypi.python.org/pypi/pas.plugins.ldap
Other
13 stars 20 forks source link

Property sheet ID is the user ID instead of the plugin ID #95

Closed reinhardt closed 4 years ago

reinhardt commented 4 years ago

The ID of an LDAPUserPropertySheet instance is the same as the ID of the user it is referring to, not the ID of the plugin as in the plone.app.ldap stack.

https://github.com/collective/pas.plugins.ldap/blob/master/src/pas/plugins/ldap/sheet.py#L50

Is there a reason for this? It would be nice to have it the same. We're checking the sheet ID in a property sync method we use in Quaive.

reinhardt commented 4 years ago

The docstring for IPropertySheet.getId() says

Identify the sheet within a collection.

See https://github.com/zopefoundation/Products.PluggableAuthService/blob/master/Products/PluggableAuthService/interfaces/propertysheets.py#L32

Returning the user ID does not do that because all sheets in the collection belong to this user.