## $Id: permissions.py 12015 2014-11-20 21:39:40Z henrik $ ## ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## """ Permissions for the customer section. """ import grok # Customer section permissions class HandleCustomer(grok.Permission): grok.name('waeup.handleCustomer') class ViewCustomer(grok.Permission): grok.name('waeup.viewCustomer') class ViewCustomersTab(grok.Permission): grok.name('waeup.viewCustomersTab') class ViewMyCustomerDataTab(grok.Permission): grok.name('waeup.viewMyCustomerDataTab') class ViewCustomersContainer(grok.Permission): grok.name('waeup.viewCustomersContainer') class EditCustomerDocuments(grok.Permission): grok.name('waeup.editCustomerDocuments') class UploadCustomerFile(grok.Permission): grok.name('waeup.uploadCustomerFile') class ManageCustomer(grok.Permission): grok.name('waeup.manageCustomer') class LoginAsCustomer(grok.Permission): grok.name('waeup.loginAsCustomer') class TriggerTransition(grok.Permission): grok.name('waeup.triggerTransition') # Local role class CustomerRecordOwner(grok.Role): grok.name('waeup.local.CustomerRecordOwner') grok.title(u'Customer Record Owner') grok.permissions('waeup.handleCustomer', 'waeup.uploadCustomerFile', 'waeup.viewCustomer', 'waeup.editCustomerDocuments') # Site Roles class CustomerRole(grok.Role): grok.name('waeup.Customer') grok.title(u'Customer (do not assign)') grok.permissions('waeup.viewProducts', 'waeup.viewMyCustomerDataTab', 'waeup.Authenticated') class CustomersOfficer(grok.Role): grok.name('waeup.CustomersOfficer') grok.title(u'Customers Officer (view only)') grok.permissions('waeup.viewCustomer','waeup.viewCustomers', 'waeup.viewCustomersTab', 'waeup.viewCustomersContainer') class CustomersManager(grok.Role): grok.name('waeup.CustomersManager') grok.title(u'Customers Manager') grok.permissions('waeup.viewCustomer', 'waeup.viewCustomers', 'waeup.manageCustomer', 'waeup.viewCustomersContainer', 'waeup.editCustomerDocuments', 'waeup.uploadCustomerFile', 'waeup.viewCustomersTab', 'waeup.triggerTransition') class CustomerImpersonator(grok.Role): grok.name('waeup.CustomerImpersonator') grok.title(u'Customer Impersonator') grok.permissions('waeup.loginAsCustomer')