Début d'intégration de PayPal.
[photoprint.git] / permissions.py
1 # -*- coding: utf-8 -*-
2 ############################################################
3 # Copyright © 2009 Benoît PIN <pinbe@luxia.fr> #
4 # Cliché - http://luxia.fr #
5 # #
6 # This program is free software; you can redistribute it #
7 # and/or modify it under the terms of the Creative Commons #
8 # "Attribution-Noncommercial 2.0 Generic" #
9 # http://creativecommons.org/licenses/by-nc/2.0/ #
10 ############################################################
11 """
12 photoprint specific permissions
13
14
15
16 """
17
18 from AccessControl import ModuleSecurityInfo
19 from Products.CMFCore.permissions import setDefaultRoles
20
21 security = ModuleSecurityInfo('Products.photoprint.permissions')
22
23 ManagePrintOrderTemplate = "Manage print order template"
24 security.declarePublic('ManagePrintOrderTemplate')
25 setDefaultRoles(ManagePrintOrderTemplate, ('Manager',))
26
27 AddPrintOrder = "Add print order"
28 security.declarePublic('AddPrintOrder')
29 setDefaultRoles(AddPrintOrder, ('Authenticated', 'Manager',))
30
31 ListPrintOrders = "List print orders"
32 security.declarePublic('ListPrintOrders')
33 setDefaultRoles(ListPrintOrders, ('Manager',))
34
35 ManagePrintOrders = "Manage print orders"
36 security.declarePublic('ManagePrintOrders')
37 setDefaultRoles(ManagePrintOrders, ('Manager',))