[Zope-PAS] PAS: authenticateCredentials: check lowercase too?

Maurits van Rees m.van.rees at zestsoftware.nl
Mon Jan 21 14:50:03 UTC 2013


Hello again,

Okay, I am done with all the changes that I think are needed. The branch 
is ready for review and if accepted I can merge it:
http://svn.zope.org/repos/main/Products.PluggableAuthService/branches/maurits-login-transform

Summary of changes:

- Added login_transform string property to PAS.

- Added applyTransform method to PAS, which looks for a method on PAS 
with the name specified in the login_transform property.

- Added two possible transforms to PAS: lower and upper.

- Changed the methods of PAS to call applyTransform wherever needed.

- Added the existing updateUser method of ZODBUserManager to the 
IUserEnumerationPlugin interface.

- Added a new updateEveryLoginName method to ZODBUserManager and the 
IUserEnumerationPlugin interface.

- Added three methods to PAS and IPluggableAuthService: updateLoginName, 
updateOwnLoginName, updateAllLoginNames. These methods call updateUser 
or updateEveryLoginName on every IUserEnumerationPlugin. Since these are 
later additions to the plugin interface, we log a warning when a plugin 
does not have these methods (for example the mutable_properties plugin 
of PlonePAS, though I will update that one) but will not fail. When no 
plugin is able to update a user, this will raise an exception: we do not 
want to quietly let this pass when for example a login name is already 
taken by another user.

- Changing the login_transform property in the ZMI will call 
PAS.updateAllLoginNames. If login_transform is the same or has become an 
empty string, we do not do anything.

- Updated and added tests. All pass: "Total: 519 tests, 0 failures, 0 
errors in 0.868 seconds."

- The new login_transform property is empty by default. In that case, 
the behavior of PAS is the same as it currently is. The various 
applyTransform calls will have a (presumably very small) performance impact.

Please tell me what you think.

Thanks,

-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl



More information about the Zope-PAS mailing list