[Zope-CMF] Add CMF Sites

Tres Seaver tseaver@zope.com
17 Oct 2002 17:54:35 -0400


On Thu, 2002-10-17 at 17:03, Mark McEahern wrote:
> This is a very minor question, but I was grepping through the source on
> disk, trying to find where "Add CMF Sites" (the permission) is defined--and
> I couldn't find it!  Where is this permission defined?  I have CMF 1.3.
> Here's the search:
> 
> <!--search-->
> 
> $ find -type f -exec grep -H -i "Add CMF Sites" {} \;
> ./CMFDefault/help/CreateCMFSite.stx:      (ZMI) with a user ID having the
> "Add CMF Sites" permission
> ./docs/CMFDocumentation.stx:          management interface (ZMI). You must
> also have the "Add CMF Sites"
> 
> <!--search-->
> 
> Of course, I first looked in CMFCore/CMFCorePermissions.py, expecting to
> find it there--no luck.

Check out CMFDefault.initialize()::

    context.registerClass(Portal.CMFSite,
                          constructors=(Portal.manage_addCMFSiteForm,
                                        Portal.manage_addCMFSite,
                                        ),
                          icon='portal.gif')

Zope's ProductContext synthesizes the add permission using the class
metatype, if no permission is passed explicitly.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com