Commit 0d644dae authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use Products.CMFCore.permissions if possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3924 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 144ccbf0
...@@ -36,38 +36,42 @@ A complete explanation of the Zope security architecture is available here: ...@@ -36,38 +36,42 @@ A complete explanation of the Zope security architecture is available here:
http://dev.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecurityForDevelopers http://dev.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecurityForDevelopers
""" """
from Products.CMFCore.CMFCorePermissions import setDefaultRoles try:
from Products.CMFCore import CMFCorePermissions from Products.CMFCore import permissions
except ImportError:
from Products.CMFCore import CMFCorePermissions as permissions
setDefaultRoles = permissions.setDefaultRoles
# Default Zope Permissions # Default Zope Permissions
View = CMFCorePermissions.View View = permissions.View
AccessContentsInformation = CMFCorePermissions.AccessContentsInformation AccessContentsInformation = permissions.AccessContentsInformation
UndoChanges = CMFCorePermissions.UndoChanges UndoChanges = permissions.UndoChanges
ChangePermissions = CMFCorePermissions.ChangePermissions ChangePermissions = permissions.ChangePermissions
ViewManagementScreens = CMFCorePermissions.ViewManagementScreens ViewManagementScreens = permissions.ViewManagementScreens
ManageProperties = CMFCorePermissions.ManageProperties ManageProperties = permissions.ManageProperties
FTPAccess = CMFCorePermissions.FTPAccess FTPAccess = permissions.FTPAccess
# Default CMF Core Permissions # Default CMF Core Permissions
ListFolderContents = CMFCorePermissions.ListFolderContents ListFolderContents = permissions.ListFolderContents
ListUndoableChanges = CMFCorePermissions.ListUndoableChanges ListUndoableChanges = permissions.ListUndoableChanges
AccessInactivePortalContent = CMFCorePermissions.AccessInactivePortalContent AccessInactivePortalContent = permissions.AccessInactivePortalContent
ModifyCookieCrumblers = CMFCorePermissions.ModifyCookieCrumblers ModifyCookieCrumblers = permissions.ModifyCookieCrumblers
ReplyToItem = CMFCorePermissions.ReplyToItem ReplyToItem = permissions.ReplyToItem
ManagePortal = CMFCorePermissions.ManagePortal ManagePortal = permissions.ManagePortal
ModifyPortalContent = CMFCorePermissions.ModifyPortalContent ModifyPortalContent = permissions.ModifyPortalContent
#ManageProperties = CMFCorePermissions.ManageProperties #ManageProperties = permissions.ManageProperties
ListPortalMembers = CMFCorePermissions.ListPortalMembers ListPortalMembers = permissions.ListPortalMembers
AddPortalFolders = CMFCorePermissions.AddPortalFolders AddPortalFolders = permissions.AddPortalFolders
AddPortalContent = CMFCorePermissions.AddPortalContent AddPortalContent = permissions.AddPortalContent
SetOwnPassword = CMFCorePermissions.SetOwnPassword SetOwnPassword = permissions.SetOwnPassword
AddPortalMember = CMFCorePermissions.AddPortalMember AddPortalMember = permissions.AddPortalMember
SetOwnProperties = CMFCorePermissions.SetOwnProperties SetOwnProperties = permissions.SetOwnProperties
# Default CMF Workflow Permissions # Default CMF Workflow Permissions
RequestReview = CMFCorePermissions.RequestReview RequestReview = permissions.RequestReview
ReviewPortalContent = CMFCorePermissions.ReviewPortalContent ReviewPortalContent = permissions.ReviewPortalContent
AccessFuturePortalContent = CMFCorePermissions.AccessFuturePortalContent AccessFuturePortalContent = permissions.AccessFuturePortalContent
# ERP5 addition: delete content. It is still unclear # ERP5 addition: delete content. It is still unclear
# if this permission makes any sense since we may # if this permission makes any sense since we may
...@@ -75,7 +79,7 @@ AccessFuturePortalContent = CMFCorePermissions.AccessFuturePortalContent ...@@ -75,7 +79,7 @@ AccessFuturePortalContent = CMFCorePermissions.AccessFuturePortalContent
# this permission does not fit into the DC workflow framework # this permission does not fit into the DC workflow framework
# since it applies to the content itself rather than to the # since it applies to the content itself rather than to the
# container # container
DeletePortalContent = CMFCorePermissions.ModifyPortalContent DeletePortalContent = permissions.ModifyPortalContent
# ERP5 addition: default content translation permissions # ERP5 addition: default content translation permissions
# this comes from Base18 # this comes from Base18
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment