Masquage du diaporama html standard.
[Plinn.git] / permissions.py
1 """ Plinn permissions
2
3
4
5 """
6 from AccessControl import Permissions
7 from AccessControl import ModuleSecurityInfo
8 from Products.CMFCore.permissions import setDefaultRoles
9
10 security = ModuleSecurityInfo('Products.Plinn.permissions')
11
12 DeleteObjects = Permissions.delete_objects
13 security.declarePublic('DeleteObjects')
14
15 ViewHistory = Permissions.view_history
16 security.declarePublic('ViewHistory')
17
18 #
19 # Plinn Base Permissions
20 #
21
22
23 RemoveMember = 'Remove member'
24 security.declarePublic('RemoveMember')
25 setDefaultRoles( RemoveMember, ( 'Manager', ) )
26
27 SetLocalRoles = 'Set Local Roles'
28 security.declarePublic('SetLocalRoles')
29 setDefaultRoles( SetLocalRoles, ( 'Manager', 'Owner' ) )
30
31 DeleteOwnedObjects = 'Delete Owned Objects'
32 security.declarePublic('DeleteOwnedObjects')
33 setDefaultRoles( DeleteOwnedObjects, ('Owner', ) )
34
35 DeletePortalContents = 'Delete Portal Contents'
36 security.declarePublic('DeletePortalContents')
37 setDefaultRoles( DeletePortalContents, ('Manager', 'Owner') ) # + Member
38
39 SetMemberProperties = 'Set Member Properties'
40 security.declarePublic('SetMemberProperties')
41 setDefaultRoles( SetMemberProperties, ( 'Manager', ) )
42
43 SetMemberPassword = 'Set Member Password'
44 security.declarePublic('SetMemberPassword')
45 setDefaultRoles( SetMemberPassword, ( 'Manager', ) )
46
47 CheckMemberPermission = 'Check Member Permission'
48 security.declarePublic('CheckMemberPermission')
49 setDefaultRoles( CheckMemberPermission, ( 'Manager', ) )
50
51 ListNotificationSettings = 'List Notification Settings'
52 security.declarePublic('ListNotificationSettings')
53 setDefaultRoles( ListNotificationSettings, ( 'Manager', ) )
54
55 SubscribeNotification = 'Subscribe Notification'
56 security.declarePublic('SubscribeNotification')
57 setDefaultRoles( SubscribeNotification, ( 'Manager', 'Owmer') ) # + Reader
58
59 #
60 # Make public GRUF permissions
61 #
62 from Products.GroupUserFolder.GroupsToolPermissions import AddGroups, \
63 ManageGroups, \
64 ViewGroups, \
65 DeleteGroups, \
66 SetGroupOwnership
67
68 security.declarePublic('AddGroups')
69 security.declarePublic('ManageGroups')
70 security.declarePublic('ViewGroups')
71 security.declarePublic('DeleteGroups')
72 security.declarePublic('SetGroupOwnership')