source: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/permissions.py @ 12535

Last change on this file since 12535 was 12347, checked in by Henrik Bettermann, 10 years ago

We do nor need an extra permission for uploading passport pictures.

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1## $Id: permissions.py 12347 2014-12-31 08:18:54Z henrik $
2##
3## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18"""
19Permissions for the customer section.
20"""
21import grok
22
23# Customer section permissions
24
25
26class HandleCustomer(grok.Permission):
27    grok.name('waeup.handleCustomer')
28
29
30class ViewCustomer(grok.Permission):
31    grok.name('waeup.viewCustomer')
32
33
34class ViewCustomersTab(grok.Permission):
35    grok.name('waeup.viewCustomersTab')
36
37
38class ViewMyCustomerDataTab(grok.Permission):
39    grok.name('waeup.viewMyCustomerDataTab')
40
41
42class ViewCustomersContainer(grok.Permission):
43    grok.name('waeup.viewCustomersContainer')
44
45
46class EditCustomerDocuments(grok.Permission):
47    grok.name('waeup.editCustomerDocuments')
48
49
50class EditContracts(grok.Permission):
51    grok.name('waeup.editContracts')
52
53
54class ManageCustomer(grok.Permission):
55    grok.name('waeup.manageCustomer')
56
57
58class LoginAsCustomer(grok.Permission):
59    grok.name('waeup.loginAsCustomer')
60
61
62class TriggerTransition(grok.Permission):
63    grok.name('waeup.triggerTransition')
64
65
66# Local role
67class CustomerRecordOwner(grok.Role):
68    grok.name('waeup.local.CustomerRecordOwner')
69    grok.title(u'Customer Record Owner')
70    grok.permissions('waeup.handleCustomer',
71                     'waeup.viewCustomer', 'waeup.editCustomerDocuments',
72                     'waeup.editContracts')
73
74
75# Site Roles
76class CustomerRole(grok.Role):
77    grok.name('waeup.Customer')
78    grok.title(u'Customer (do not assign)')
79    grok.permissions('waeup.viewProducts', 'waeup.viewMyCustomerDataTab',
80                     'waeup.Authenticated')
81
82
83class CustomersOfficer(grok.Role):
84    grok.name('waeup.CustomersOfficer')
85    grok.title(u'Customers Officer (view only)')
86    grok.permissions('waeup.viewCustomer','waeup.viewCustomers',
87          'waeup.viewCustomersTab', 'waeup.viewCustomersContainer')
88
89
90class CustomersManager(grok.Role):
91    grok.name('waeup.CustomersManager')
92    grok.title(u'Customers Manager')
93    grok.permissions('waeup.viewCustomer', 'waeup.viewCustomers',
94                     'waeup.manageCustomer', 'waeup.viewCustomersContainer',
95                     'waeup.editCustomerDocuments',
96                     'waeup.viewCustomersTab', 'waeup.triggerTransition',
97                     'waeup.editContracts')
98
99
100class CustomerImpersonator(grok.Role):
101    grok.name('waeup.CustomerImpersonator')
102    grok.title(u'Customer Impersonator')
103    grok.permissions('waeup.loginAsCustomer')
Note: See TracBrowser for help on using the repository browser.