[CMF-checkins] CVS: CMF/CMFCore - CMFCorePermissions.py:1.18
Yvo Schubbe
schubbe at web.de
Mon Oct 20 10:25:06 EDT 2003
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv32307/CMFCore
Modified Files:
CMFCorePermissions.py
Log Message:
made named permissions usable in TTW code
=== CMF/CMFCore/CMFCorePermissions.py 1.17 => 1.18 ===
--- CMF/CMFCore/CMFCorePermissions.py:1.17 Wed Sep 24 06:02:14 2003
+++ CMF/CMFCore/CMFCorePermissions.py Mon Oct 20 10:25:05 2003
@@ -16,22 +16,47 @@
"""
import Products
+from AccessControl import ModuleSecurityInfo
from AccessControl import Permissions
from AccessControl.Permission import _registeredPermissions
from AccessControl.Permission import pname
from Globals import ApplicationDefaultPermissions
+
+security = ModuleSecurityInfo('Products.CMFCore.CMFCorePermissions')
+
+#
# General Zope permissions
+#
+
+security.declarePublic('AccessContentsInformation')
AccessContentsInformation = Permissions.access_contents_information
+
+security.declarePublic('ChangePermissions')
ChangePermissions = Permissions.change_permissions
+
+security.declarePublic('DeleteObjects')
DeleteObjects = Permissions.delete_objects
+
+security.declarePublic('FTPAccess')
FTPAccess = Permissions.ftp_access
+
+security.declarePublic('ManageProperties')
ManageProperties = Permissions.manage_properties
+
+security.declarePublic('ManageUsers')
ManageUsers = Permissions.manage_users
+
+security.declarePublic('UndoChanges')
UndoChanges = Permissions.undo_changes
+
+security.declarePublic('View')
View = Permissions.view
+
+security.declarePublic('ViewManagementScreens')
ViewManagementScreens = Permissions.view_management_screens
+security.declarePrivate('setDefaultRoles')
def setDefaultRoles(permission, roles):
'''
Sets the defaults roles for a permission.
@@ -53,48 +78,63 @@
# CMF Base Permissions
#
+security.declarePublic('ListFolderContents')
ListFolderContents = 'List folder contents'
setDefaultRoles( ListFolderContents, ( 'Manager', 'Owner' ) )
+security.declarePublic('ListUndoableChanges')
ListUndoableChanges = 'List undoable changes'
setDefaultRoles( ListUndoableChanges, ('Manager',) ) # + Member
+security.declarePublic('AccessInactivePortalContent')
AccessInactivePortalContent = 'Access inactive portal content'
setDefaultRoles(AccessInactivePortalContent, ('Manager',))
+security.declarePublic('ModifyCookieCrumblers')
ModifyCookieCrumblers = 'Modify Cookie Crumblers'
setDefaultRoles(ModifyCookieCrumblers, ('Manager',))
+security.declarePublic('ReplyToItem')
ReplyToItem = 'Reply to item'
setDefaultRoles(ReplyToItem, ('Manager',)) # + Member
+security.declarePublic('ManagePortal')
ManagePortal = 'Manage portal'
setDefaultRoles(ManagePortal, ('Manager',))
+security.declarePublic('ModifyPortalContent')
ModifyPortalContent = 'Modify portal content'
setDefaultRoles(ModifyPortalContent, ('Manager',))
+security.declarePublic('ListPortalMembers')
ListPortalMembers = 'List portal members'
setDefaultRoles( ListPortalMembers, ('Manager',) ) # + Member
+security.declarePublic('AddPortalFolders')
AddPortalFolders = 'Add portal folders'
setDefaultRoles(AddPortalFolders, ('Owner','Manager')) # + Member
+security.declarePublic('AddPortalContent')
AddPortalContent = 'Add portal content'
setDefaultRoles(AddPortalContent, ('Owner','Manager',)) # + Member
+security.declarePublic('AddPortalMember')
AddPortalMember = 'Add portal member'
setDefaultRoles(AddPortalMember, ('Anonymous', 'Manager',))
+security.declarePublic('SetOwnPassword')
SetOwnPassword = 'Set own password'
setDefaultRoles(SetOwnPassword, ('Manager',)) # + Member
+security.declarePublic('SetOwnProperties')
SetOwnProperties = 'Set own properties'
setDefaultRoles(SetOwnProperties, ('Manager',)) # + Member
+security.declarePublic('ChangeLocalRoles')
ChangeLocalRoles = 'Change local roles'
setDefaultRoles(ChangeLocalRoles, ('Owner', 'Manager'))
+security.declarePublic('MailForgottenPassword')
MailForgottenPassword = 'Mail forgotten password'
setDefaultRoles(MailForgottenPassword, ('Anonymous', 'Manager',))
@@ -103,12 +143,14 @@
# Workflow Permissions
#
+security.declarePublic('RequestReview')
RequestReview = 'Request review'
setDefaultRoles(RequestReview, ('Owner', 'Manager',))
+security.declarePublic('ReviewPortalContent')
ReviewPortalContent = 'Review portal content'
setDefaultRoles(ReviewPortalContent, ('Manager',)) # + Reviewer
+security.declarePublic('AccessFuturePortalContent')
AccessFuturePortalContent = 'Access future portal content'
setDefaultRoles(AccessFuturePortalContent, ('Manager',)) # + Reviewer
-
More information about the CMF-checkins
mailing list