[CMF-checkins] CVS: CMF/CMFWorkspaces - permissions.py:1.1.2.1 OrganizationTool.py:1.7.16.1 Workspace.py:1.10.6.1 __init__.py:1.4.24.1

Tres Seaver tseaver at zope.com
Thu Apr 29 11:37:13 EDT 2004


Update of /cvs-repository/CMF/CMFWorkspaces
In directory cvs.zope.org:/tmp/cvs-serv17086/CMFWorkspaces

Modified Files:
      Tag: tseaver-permissiongeddon-branch
	OrganizationTool.py Workspace.py __init__.py 
Added Files:
      Tag: tseaver-permissiongeddon-branch
	permissions.py 
Log Message:



 - Enforced new "local permissions" pattern:  each top-level CMF product
   should have a 'permissions.py' module which imports / declares all
   permissions used within the product;  other modules within the product
   should import from there.  Likewise for 'exceptions.py'. CMFCorePermissions
   delenda est!



=== Added File CMF/CMFWorkspaces/permissions.py ===
""" CMFWorkspace product permissions

$Id: permissions.py,v 1.1.2.1 2004/04/29 15:36:42 tseaver Exp $
"""
from AccessControl import ModuleSecurityInfo

security = ModuleSecurityInfo('Products.CMFWorkspace.permissions')

security.declarePublic('AddPortalFolders')
from Products.CMFCore.permissions import AddPortalFolders

security.declarePublic('ManagePortal')
from Products.CMFCore.permissions import ManagePortal

security.declarePublic('View')
from Products.CMFCore.permissions import View

security.declarePublic('ManageWorkspaces')
ManageWorkspaces = 'Manage Workspaces'


=== CMF/CMFWorkspaces/OrganizationTool.py 1.7 => 1.7.16.1 ===
--- CMF/CMFWorkspaces/OrganizationTool.py:1.7	Tue Feb 18 15:12:41 2003
+++ CMF/CMFWorkspaces/OrganizationTool.py	Thu Apr 29 11:36:42 2004
@@ -24,17 +24,20 @@
 
 $Id$
 """
-
 import os
 from urllib import quote
 
-from Acquisition import aq_inner, aq_parent
-from Globals import InitializeClass, DTMLFile
-from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from Acquisition import aq_inner
+from Acquisition import aq_parent
+from Globals import InitializeClass
+from Globals import DTMLFile
 from OFS.SimpleItem import SimpleItem
 from AccessControl import ClassSecurityInfo
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+
 from Products.CMFCore.utils import UniqueObject, getToolByName
-from Products.CMFCore.CMFCorePermissions import ManagePortal
+
+from permissions import ManagePortal
 
 _wwwdir = os.path.join(os.path.dirname(__file__), 'www') 
 


=== CMF/CMFWorkspaces/Workspace.py 1.10 => 1.10.6.1 ===
--- CMF/CMFWorkspaces/Workspace.py:1.10	Fri May  9 17:40:25 2003
+++ CMF/CMFWorkspaces/Workspace.py	Thu Apr 29 11:36:42 2004
@@ -44,16 +44,19 @@
 import Globals
 import webdav
 from DateTime import DateTime
-from AccessControl import ClassSecurityInfo, User, getSecurityManager
+from AccessControl import ClassSecurityInfo
+from AccessControl import User
+from AccessControl import getSecurityManager
+
 from Products.CMFCore import PortalContent
-from Products.CMFCore.CMFCorePermissions import View
 from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
 
 from References import ReferenceCollection
+from permissions import View
+from permissions import ManageWorkspaces
 
 
 # Permission name
-ManageWorkspaces = 'Manage Workspaces'
 
 
 factory_type_information = (


=== CMF/CMFWorkspaces/__init__.py 1.4 => 1.4.24.1 ===
--- CMF/CMFWorkspaces/__init__.py:1.4	Sat Aug  3 23:51:56 2002
+++ CMF/CMFWorkspaces/__init__.py	Thu Apr 29 11:36:42 2004
@@ -20,9 +20,10 @@
 
 from Products.CMFCore import utils
 from Products.CMFCore.DirectoryView import registerDirectory
-from Products.CMFCore.CMFCorePermissions import AddPortalFolders
 
-import Workspace, OrganizationTool
+import Workspace
+import OrganizationTool
+from permissions import AddPortalFolders
 
 
 registerDirectory('skins', globals())




More information about the CMF-checkins mailing list