[Zope-CMF] subclassing CMFPlone.MembershipTool

Karl Anderson kra@monkey.org
19 Jul 2002 17:02:33 -0700


Florent Guillaume <fg@nuxeo.com> writes:

> Karl Anderson  <kra@monkey.org> wrote:
> > This is really a Python question, but I'm wondering how the Plone
> > people do this.  I'm trying to sublclass Plone's MembershipTool using
> > the source below.  It overrides creeateMemberarea(), and currently
> > does exactly what Plone's version does.
> > 
> > When it is called, it gives me an attribute error because
> > self.__getPUS() is munged to self._MyMemberhipTool__getPUS(), whether
> > I'm subclassing from CMFDefault or CMFPlone.  That's to be expected,
> > but how does Plone get away with the same thing?
> 
> Simply call explicitely self._MemberhipTool__getPUS().

Yeah, I know, or just access the darn acl_users directly, and break if
it's a LoginManager.  I just gotta know why Plone's MembershipTool
doesn't have to do it that way :)

-- 
Karl Anderson      kra@monkey.org           http://www.monkey.org/~kra/