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/
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to