Ignore:
Timestamp:
26 Jan 2017, 15:03:56 (8 years ago)
Author:
Henrik Bettermann
Message:

Enable report creation for admin and isouaba.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/reports/student_payment_statistics.py

    r14280 r14466  
    2828    def update(
    2929        self, CREATE=None, session=None, mode=None, level=None, breakdown=None):
    30         self.flash('Temporarily disabled.', type='warning')
    31         self.redirect(self.url(self.context.__parent__))
    32         #(role_ids, setting) = IPrincipalRoleManager(
    33         #    grok.getSite()).getRolesForPrincipal(self.request.principal.id)
    34         #super(CustomStudentPaymentStatisticsReportGeneratorPage, self).update(
    35         #    CREATE, session, mode, level, breakdown)
     30
     31        if not self.request.principal.id in ('admin', 'isouaba', 'zope.manager'):
     32            self.flash('Temporarily disabled.', type='warning')
     33            self.redirect(self.url(self.context.__parent__))
     34            return
     35        super(CustomStudentPaymentStatisticsReportGeneratorPage, self).update(
     36            CREATE, session, mode, level, breakdown)
    3637        return
Note: See TracChangeset for help on using the changeset viewer.