[Zope-CMF] Once again: CMF-in-CMF

Thomas Olsen tol@tanghus.dk
Wed, 24 Apr 2002 16:12:48 +0200


On Tuesday 23 April 2002 21:00, Dieter Maurer wrote:
>
> A bug in the "MembershipTool".
>
> Please visit the CMF Tracker. I filed a bug report with patch...

That helped. Thanks!=20

BTW: Isn't there a more elegant way to get the user object from=20
up-in-hierarchy user folders? I use a customized snippet from=20
AccessControl/Roles.py:

    def getWrappedUser(self, username):
        item=3Dself
        _notfound =3D []
        user =3D None
        while 1:
            aclu =3D getattr(aq_base(item), 'acl_users', _notfound)
            if aclu is not _notfound:
                un =3D getattr(aclu, 'user_names', _notfound)
                if un is not _notfound:
                    unl =3D un()
                    if username in un():
                        user =3D aclu.getUser(username).__of__(aclu)
                        break
            item =3D getattr(item, 'aq_parent', _notfound)
            if item is _notfound:
                break
        return user


--=20
Regards,
=09Thomas Olsen