[Zope-dev] Very minor bugfix suggestion. Strip role names
Lennart Regebro
regebro at gmail.com
Thu Apr 6 12:31:39 EDT 2006
When adding new rols through the ZMI it is easy to accidentaly let
trailing or leading spaces stay in the role name, especially if you
cut and paste. Debugging that is very annoying because that leading
and trailing space is not visible anywhere.
So, I suggest to just add a .strip() like so (This is in Roles.py):
def manage_defined_roles(self, submit=None, REQUEST=None):
"""Called by management screen.
"""
if submit=='Add Role':
role=reqattr(REQUEST, 'role')
return self._addRole(role.strip(), REQUEST)
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope-Dev
mailing list