Changeset 12764


Ignore:
Timestamp:
15 Mar 2015, 06:18:19 (10 years ago)
Author:
Henrik Bettermann
Message:

Configure permissions to view and manage payments.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/browser/browser.txt

    r12762 r12764  
    4747And then change back to English by clicking on the third link containing 'en'
    4848behind 'Anfragen' and 'Einloggen'::
    49   >>> browser.getLink('en', index=3).click()
     49  >>> browser.getLink('en', index=2).click()
    5050  >>> print browser.contents
    5151  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/browser.py

    r12763 r12764  
    4848    grok.context(IIkobaObject)
    4949    grok.order(3)
    50     grok.require('waeup.Public')
     50    grok.require('waeup.viewPayments')
    5151    grok.name('paymentstab')
    5252
     
    9595    grok.context(IPaymentsContainer)
    9696    grok.name('index')
    97     grok.require('waeup.managePortal')
     97    grok.require('waeup.viewPayments')
    9898    grok.template('containerpage')
    9999    label = _('Find payments')
     
    134134    grok.context(IPaymentsContainer)
    135135    grok.name('manage')
    136     grok.require('waeup.managePortal')
     136    grok.require('waeup.managePayments')
    137137    grok.template('containermanagepage')
    138138    pnav = 5
  • main/waeup.ikoba/trunk/src/waeup/ikoba/permissions.py

    r12347 r12764  
    7171    grok.name('waeup.managePortalConfiguration')
    7272
     73class ViewPayments(grok.Permission):
     74    grok.name('waeup.viewPayments')
     75
     76class ManagePayments(grok.Permission):
     77    grok.name('waeup.managePayments')
    7378
    7479# Local Roles
     
    125130    grok.title(u'Workflow Manager')
    126131    grok.permissions('waeup.triggerTransition')
     132
     133class PaymentsOfficer(grok.Role):
     134    grok.name('waeup.PaymentsOfficer')
     135    grok.title(u'Payments Officer (view only)')
     136    grok.permissions('waeup.viewPayments')
     137
     138class PaymentsManager(grok.Role):
     139    grok.name('waeup.PaymentsManager')
     140    grok.title(u'Payments Manager')
     141    grok.permissions('waeup.viewPayments',
     142                     'waeup.managePayments')
    127143
    128144class PortalManager(grok.Role):
     
    145161                     'waeup.triggerTransition',
    146162                     'waeup.viewCustomersTab',
    147                      'waeup.editContracts'
     163                     'waeup.editContracts',
     164                     'managePayments'
    148165                     )
    149166
     
    172189                     'waeup.triggerTransition',
    173190                     'waeup.viewCustomersTab',
    174                      'waeup.editContracts'
     191                     'waeup.editContracts',
     192                     'managePayments'
    175193                     )
    176194
  • main/waeup.ikoba/trunk/src/waeup/ikoba/permissions.txt

    r12207 r12764  
    3939    >>> from waeup.ikoba.permissions import get_waeup_roles
    4040    >>> len(list(get_waeup_roles()))
    41     15
     41    17
    4242
    4343    >>> len(list(get_waeup_roles(also_local=True)))
    44     19
     44    21
    4545
    4646
     
    6262    u'waeup.ExportManager',
    6363    u'waeup.ImportManager',
     64    u'waeup.PaymentsManager',
     65    u'waeup.PaymentsOfficer',
    6466    u'waeup.PortalManager',
    6567    u'waeup.ProductsManager',
Note: See TracChangeset for help on using the changeset viewer.