forked from CGM_Public/pretix_original
* Added non-admission setting to event `ticket_download_nonadm` now setting in storage. Still need logic for order page/PDF generation. Works on pretix/pretix#456. * Download button considers `ticket_download_nonadm` Modified Django tags to look at item admission attribute and `ticket_download_nonadm` setting. Works on pretix/pretix#456. * Ticket output for non-admission disabled PDFs/etc. will only be permitted/generated for items with the `admission` attribute, or if the `ticket_download_nonadm` event setting is true. Applies to single and whole-order ticket downloads. Works on pretix/pretix#456. * Fixed product exclusion in PDF output Forgot PDF output was a plugin, now includes same check as base `BaseTicketOutput.generate_order`. Works on pretix/pretix#456
This commit is contained in:
committed by
Raphael Michel
parent
571b3fbfa8
commit
d929b163db
@@ -544,6 +544,8 @@ class OrderDownload(EventViewMixin, OrderDetailMixin, View):
|
||||
return self.error(_('Ticket download is not (yet) enabled.'))
|
||||
if 'position' in kwargs and (self.order_position.addon_to and not self.request.event.settings.ticket_download_addons):
|
||||
return self.error(_('Ticket download is not enabled for add-on products.'))
|
||||
if 'position' in kwargs and (not self.order_position.item.admission and not self.request.event.settings.ticket_download_nonadm):
|
||||
return self.error(_('Ticket download is not enabled for non-admission products.'))
|
||||
|
||||
if 'position' in kwargs:
|
||||
return self._download_position()
|
||||
|
||||
Reference in New Issue
Block a user