3 $Id: permissions.py 1514 2009-06-26 02:03:59Z pin $
4 $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/permissions.py $
6 from AccessControl
import Permissions
7 from AccessControl
import ModuleSecurityInfo
8 from Products
.CMFCore
.permissions
import setDefaultRoles
10 security
= ModuleSecurityInfo('Products.Plinn.permissions')
12 DeleteObjects
= Permissions
.delete_objects
13 security
.declarePublic('DeleteObjects')
15 ViewHistory
= Permissions
.view_history
16 security
.declarePublic('ViewHistory')
19 # Plinn Base Permissions
23 RemoveMember
= 'Remove member'
24 security
.declarePublic('RemoveMember')
25 setDefaultRoles( RemoveMember
, ( 'Manager', ) )
27 SetLocalRoles
= 'Set Local Roles'
28 security
.declarePublic('SetLocalRoles')
29 setDefaultRoles( SetLocalRoles
, ( 'Manager', 'Owner' ) )
31 DeleteOwnedObjects
= 'Delete Owned Objects'
32 security
.declarePublic('DeleteOwnedObjects')
33 setDefaultRoles( DeleteOwnedObjects
, ('Owner', ) )
35 DeletePortalContents
= 'Delete Portal Contents'
36 security
.declarePublic('DeletePortalContents')
37 setDefaultRoles( DeletePortalContents
, ('Manager', 'Owner') ) # + Member
39 SetMemberProperties
= 'Set Member Properties'
40 security
.declarePublic('SetMemberProperties')
41 setDefaultRoles( SetMemberProperties
, ( 'Manager', ) )
43 SetMemberPassword
= 'Set Member Password'
44 security
.declarePublic('SetMemberPassword')
45 setDefaultRoles( SetMemberPassword
, ( 'Manager', ) )
47 CheckMemberPermission
= 'Check Member Permission'
48 security
.declarePublic('CheckMemberPermission')
49 setDefaultRoles( CheckMemberPermission
, ( 'Manager', ) )
51 ListNotificationSettings
= 'List Notification Settings'
52 security
.declarePublic('ListNotificationSettings')
53 setDefaultRoles( ListNotificationSettings
, ( 'Manager', ) )
55 SubscribeNotification
= 'Subscribe Notification'
56 security
.declarePublic('SubscribeNotification')
57 setDefaultRoles( SubscribeNotification
, ( 'Manager', 'Owmer') ) # + Reader
60 # Make public GRUF permissions
62 from Products
.GroupUserFolder
.GroupsToolPermissions
import AddGroups
, \
68 security
.declarePublic('AddGroups')
69 security
.declarePublic('ManageGroups')
70 security
.declarePublic('ViewGroups')
71 security
.declarePublic('DeleteGroups')
72 security
.declarePublic('SetGroupOwnership')