Changeset 17428


Ignore:
Timestamp:
3 Jun 2023, 04:47:45 (19 months ago)
Author:
Henrik Bettermann
Message:

Reenable data export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/browser/pages.py

    r17426 r17428  
    4848# Temporarily disable data export
    4949
    50 class CustomExportCSVPage(ExportCSVPage):
     50#class CustomExportCSVPage(ExportCSVPage):
    5151
    52     def update(self, CREATE=None, DISCARD=None, PURGE=None, exporter=None,
    53                job_id=None, CANCEL=None):
    54         if self.request.principal.id not in (
    55             'admin', 'zope.manager', 'zope.mgr', 'amadin'):
    56             self.flash('Data export has been temporarily disabled.',
    57                        type='warning')
    58             return self.redirect(self.url(self.context))
    59         return super(CustomExportCSVPage,self).update(CREATE, DISCARD,
    60             PURGE, exporter, job_id, CANCEL)
     52#    def update(self, CREATE=None, DISCARD=None, PURGE=None, exporter=None,
     53#               job_id=None, CANCEL=None):
     54#        if self.request.principal.id not in (
     55#            'admin', 'zope.manager', 'zope.mgr', 'amadin'):
     56#            self.flash('Data export has been temporarily disabled.',
     57#                       type='warning')
     58#            return self.redirect(self.url(self.context))
     59#        return super(CustomExportCSVPage,self).update(CREATE, DISCARD,
     60#            PURGE, exporter, job_id, CANCEL)
    6161
    62 class CustomReportsContainerPage(ReportsContainerPage):
     62#class CustomReportsContainerPage(ReportsContainerPage):
    6363
    64     def update(self, job_id=None, DISCARD=None, DOWNLOAD=None, PURGE=None):
    65         if self.request.principal.id not in (
    66             'admin', 'zope.manager', 'zope.mgr', 'amadin'):
    67             self.flash('Reports have been temporarily disabled.',
    68                        type='warning')
    69             return self.redirect(self.application_url())
    70         return super(CustomReportsContainerPage,self).update(
    71             job_id, DISCARD, DOWNLOAD, PURGE)
     64#    def update(self, job_id=None, DISCARD=None, DOWNLOAD=None, PURGE=None):
     65#        if self.request.principal.id not in (
     66#            'admin', 'zope.manager', 'zope.mgr', 'amadin'):
     67#            self.flash('Reports have been temporarily disabled.',
     68#                       type='warning')
     69#            return self.redirect(self.application_url())
     70#        return super(CustomReportsContainerPage,self).update(
     71#            job_id, DISCARD, DOWNLOAD, PURGE)
Note: See TracChangeset for help on using the changeset viewer.