Changeset 17823 for main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
- Timestamp:
- 27 Jun 2024, 09:18:42 (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r17798 r17823 26 26 from random import SystemRandom as r 27 27 from zope.i18n import translate 28 from zope.security import checkPermission 28 29 from waeup.kofa.interfaces import IKofaUtils 29 30 from waeup.kofa.interfaces import MessageFactory as _ … … 567 568 value = int(pow(10, prec)*value) / (1.0*pow(10, prec)) 568 569 return '{:{width}.{prec}f}'.format(value, width=0, prec=prec) 570 571 def collect_exporters(self, context): 572 # Used for `ExportJobContainerJobConfig`. 573 # We provide all student exporters, nothing else, yet. 574 # Bursary, Department or Accommodation Officers don't 575 # have the general exportData 576 # permission and are only allowed to export bursary, payments 577 # overview or accommodation data respectively. 578 # This is the only place where waeup.exportAccommodationData, 579 # waeup.exportBursaryData and waeup.exportPaymentsOverview 580 # are used. 581 exporters = [] 582 if not checkPermission('waeup.exportData', context): 583 if checkPermission('waeup.exportBursaryData', context): 584 exporters += [('Bursary Data', 'bursary')] 585 if checkPermission('waeup.exportPaymentsOverview', context): 586 exporters += [('School Fee Payments Overview', 587 'sfpaymentsoverview'), 588 ('Session Payments Overview', 589 'sessionpaymentsoverview')] 590 if checkPermission('waeup.exportAccommodationData', context): 591 exporters += [('Bed Tickets', 'bedtickets'), 592 ('Accommodation Payments', 593 'accommodationpayments')] 594 return exporters
Note: See TracChangeset for help on using the changeset viewer.