source: main/waeup.kofa/branches/uli-py3/src/waeup/kofa/hostels/permissions.py @ 17650

Last change on this file since 17650 was 15279, checked in by Henrik Bettermann, 6 years ago

Bed tickets not beds.

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1## $Id: permissions.py 15279 2018-12-20 12:15:40Z henrik $
2##
3## Copyright (C) 2011 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 accommdation section.
20"""
21import grok
22
23# Accommodation section permissions
24
25class ViewHostels(grok.Permission):
26    """The ViewHostels permission is applied to all views of the
27    Accommodation Section. Users with this permission can view but not edit
28    data in the Accommodation Section.
29    """
30    grok.name('waeup.viewHostels')
31
32class ManageHostels(grok.Permission):
33    """The ManageHostels permission is applied to manage pages in the
34    Accommodation Section.
35    """
36    grok.name('waeup.manageHostels')
37
38class ExportAccommodationData(grok.Permission):
39    """Accommodation Officers don't have the general exportData
40    permission and are only allowed to export accommodation data
41    (accommodation payment tickets and bed tickets).
42    The ExportAccommodationData permission is only used to filter the
43    respective exporters in the ExportJobContainerJobConfig view.
44    """
45    grok.name('waeup.exportAccommodationData')
46
47# Site Roles
48class AccommodationOfficer(grok.Role):
49    """Accommodation Officers can view and manage hostels. They can also export
50    student accommodation data (filtered payment tickets and bed tickets).
51    They can't access the Data Center but see student data export buttons
52    in the Academic Section.
53    """
54    grok.name('waeup.AccommodationOfficer')
55    grok.title(u'Accommodation Officer')
56    grok.permissions('waeup.viewHostels',
57                     'waeup.manageHostels',
58                     'waeup.showStudents',
59                     'waeup.viewAcademics',
60                     'waeup.exportAccommodationData')
Note: See TracBrowser for help on using the repository browser.