[CMF-checkins] CVS: CMF/CMFCore - PortalFolder.py:1.43 PortalObject.py:1.5 __init__.py:1.18

Florent Guillaume fg@nuxeo.com
Sat, 3 Aug 2002 23:52:26 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv1625/CMFCore

Modified Files:
	PortalFolder.py PortalObject.py __init__.py 
Log Message:

Code cleanup:
Use declarative security instead of __ac_permissions__.
Use InitializeClass instead of default__class_init__.
Use AddPortalContent instead of ADD_CONTENT_PERMISSION.
Use AddPortalFolders instead of ADD_FOLDERS_PERMISSION.



=== CMF/CMFCore/PortalFolder.py 1.42 => 1.43 ===
 $Id$
 """
 
-ADD_FOLDERS_PERMISSION = 'Add portal folders'
-ADD_CONTENT_PERMISSION = 'Add portal content'
-
 import sys
 import Globals, re, base64, marshal, string
 


=== CMF/CMFCore/PortalObject.py 1.4 => 1.5 ===
 $Id$
 """
 
-from Globals import default__class_init__
+from Globals import InitializeClass
 from PortalFolder import PortalFolder
 from Skinnable import SkinnableObjectManager
 from CMFCorePermissions import *
@@ -48,4 +48,4 @@
     def getSkinsFolderName(self):
         return PORTAL_SKINS_TOOL_ID
 
-default__class_init__(PortalObjectBase)
+InitializeClass(PortalObjectBase)


=== CMF/CMFCore/__init__.py 1.17 => 1.18 ===
 import utils
 
 from AccessControl import ModuleSecurityInfo
+from CMFCorePermissions import AddPortalFolders
 
 prod_security = ModuleSecurityInfo( 'Products' )
 prod_security.declarePublic( 'CMFCore' )
@@ -43,7 +44,8 @@
     HAS_PAGE_TEMPLATES = 1
 
 
-ADD_FOLDERS_PERMISSION = 'Add portal folders'
+# Old name that some third-party packages may need.
+ADD_FOLDERS_PERMISSION = AddPortalFolders
 
 bases = (
     PortalObject.PortalObjectBase,
@@ -143,7 +145,7 @@
 
     utils.ContentInit( 'CMF Core Content'
                      , content_types=( PortalFolder.PortalFolder, )
-                     , permission=ADD_FOLDERS_PERMISSION
+                     , permission=AddPortalFolders
                      , extra_constructors=(
                            PortalFolder.manage_addPortalFolder, )
                      , fti=PortalFolder.factory_type_information