[Zope-Coders] Towards 2.6

Florent Guillaume fg@nuxeo.com
16 Oct 2002 20:09:23 +0200


Wow, be very careful with that.

A lot of code mixes id and name for users, and assumes they're always
the same. CMF for instance uses getUserName a *lot* when it should
really use getId.

I'd love to see it cleaned up but I'm not sure it's that easy.

Florent

On Wed, 2002-10-16 at 19:31, Chris McDonough wrote:
> I would also like to add the following bugfix (primarily geared towards
> solving a ZC customer issue).  I'd like to make it possible to be able
> for users to change their login names without effecting local roles and
> other security-related data structures.  Zope Users were always intended
> to work this way, but for hysterical raisins, they current don't.
> 
> The default "BasicUser" class in AccessControl takes a halfhearted stab
> at differentiating between the user "id" and the user "name".  But the
> "SimpleUser" subclass of it makes no distinction, and there are some
> other bits in the code that use "getUserName" against a user that should
> really use "getId".
> 
> I'm confident that this can be done without impacting backwards
> compatibility.
> 
> If no one has violent opposal, I will be checking something in to the
> trunk and the 2.6 branch that does this; it will primarily consist of
> changes to the User module, the UI for the default user folder, and some
> changes from "getUserName" in reliant code to "getId" (traversal
> security, etc).

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com