[Zope-CMF] MembershipTool: Using traversal to look up the Members folder?

Raphael Ritz r.ritz at biologie.hu-berlin.de
Wed Oct 8 07:36:22 EDT 2008


Hi,

today I'm facing the situation where I want to support a Members folder
(rare these days) but this folder should be deeper down in the site
(very rare; for me this is the first time ever).

Currently, CMF(Default - and Plone for that matter) does not support
this OOTB because CMFDefault's MembershipTool uses a simple getattr
call for the 'membersfolder_id' on the site object.
Changing this to use 'unrestrictedTraverse' instead resolves
the problem including the possibility to specify the path (or
relative content URL) to the folder in ZMI.

It does break two tests, however, as the  DummySite's
'unrestrictedTraverse' used for testing isn't clever
enough to deal with relative paths/URLs correctly.

Now my question: Is this something CMFDefault should support?
If so, I'm happy to file a ticket with a patch (and test;
I don't have repository access).
If not, I will simply keep on patching my local installation.

Just thought I'll let you know. Opinions anyone?

Raphael






More information about the Zope-CMF mailing list