[CMF-checkins] CVS: CMF/CMFWorkspaces - __init__.py:1.4
Florent Guillaume
fg@nuxeo.com
Sat, 3 Aug 2002 23:51:57 -0400
Update of /cvs-repository/CMF/CMFWorkspaces
In directory cvs.zope.org:/tmp/cvs-serv1625/CMFWorkspaces
Modified Files:
__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/CMFWorkspaces/__init__.py 1.3 => 1.4 ===
from Products.CMFCore import utils
from Products.CMFCore.DirectoryView import registerDirectory
+from Products.CMFCore.CMFCorePermissions import AddPortalFolders
import Workspace, OrganizationTool
@@ -40,12 +41,10 @@
utils.initializeBasesPhase2(z_tool_bases, context)
context.registerBaseClass(Workspace.Workspace)
- ADD_FOLDERS_PERMISSION = 'Add portal folders'
-
utils.ContentInit(
'CMF Workspace',
content_types=(Workspace.Workspace,),
- permission=ADD_FOLDERS_PERMISSION,
+ permission=AddPortalFolders,
extra_constructors=(Workspace.addWorkspace,),
fti=Workspace.factory_type_information
).initialize(context)