Ignore:
Timestamp:
3 May 2015, 06:49:12 (10 years ago)
Author:
Henrik Bettermann
Message:

Add ReportsOfficer? role. The RO is allowed to view and remove only his/her reports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/reports.py

    r12844 r12900  
    139139    """
    140140
     141class HandleReports(grok.Permission):
     142    """The HandleReports permission allows to add any kind of report
     143    and to view and remove own reports, i.e. reports which were created by
     144    the logged-in user.
     145    """
     146    grok.name('waeup.handleReports')
     147
    141148class ManageReports(grok.Permission):
    142     """The ManageReports permission allows to view, add and remove reports.
     149    """The ManageReports permission allows to view, add and remove also
     150    the reports of other users. It requires the permission to handle reports.
    143151    """
    144152    grok.name('waeup.manageReports')
    145153
     154class ReportsOfficer(grok.Role):
     155    """The Reports Officer has the permission to to view, add and remove
     156    **own** reports.
     157    """
     158    grok.name('waeup.ReportsOfficer')
     159    grok.title(u'Reports Officer')
     160    grok.permissions('waeup.handleReports')
     161
    146162class ReportsManager(grok.Role):
    147     """The ReportsManager has the permission to manage reports.
     163    """The Reports Manager has the permission to to view, add and remove
     164    **all** reports.
    148165    """
    149166    grok.name('waeup.ReportsManager')
    150167    grok.title(u'Reports Manager')
    151     grok.permissions('waeup.manageReports')
     168    grok.permissions('waeup.handleReports', 'waeup.manageReports')
    152169
    153170def get_generators():
Note: See TracChangeset for help on using the changeset viewer.