Commit Graph

1480 Commits

Author SHA1 Message Date
rash
d544df098c switch timezone in e2e tests to Europe/Berlin 2026-02-19 10:14:52 +01:00
rash
6cfdfc2cd6 add test for complete widget journey for simple event 2026-02-18 17:13:39 +01:00
rash
55299b1eae drop widget_ prefix from e2e test fixtures 2026-02-18 17:12:55 +01:00
rash
97857e7a67 test file is not actually used 2026-02-12 13:30:28 +01:00
rash
469b777dcf first couple widget e2e tests
courtesy of claude
most of the tests don't work yet
2026-02-12 13:25:43 +01:00
Richard Schreiber
1e2900ad2a Markdown: fix double escaping URLs in safelink
* Markdown: fix double escaping URLs in safelink

* add tests

* fix isort
2026-01-29 12:14:12 +01:00
Raphael Michel
3e0ff1e6ed Send security notification when recovery code is used or created by admin (#5719)
* Send security notification when recovery code is used or created by admin

"Where to store recovery codes" is one of these problems there is no
right answer to, so many people store them in a less-than-optimal place.
If that's the reality we live in, this PR adds at least a little
security so one notices when they get used :)

* Add sentence
2026-01-26 10:01:07 +01:00
Raphael Michel
8058461f10 Invoices: Allow issuing invoices only to businesses (Z#23220397) (#5807)
* Invoices: Allow issuing invoices only to businesses

In situations where every invoice has a significant accounting cost and
consumers usually do not need invoices, this can save a lot of money or
effort.

* Improve backend UI if not qualified for invoice
2026-01-26 09:52:19 +01:00
Raphael Michel
5e97f668a5 Order data export: Allow to filter by product (Z#23212618) (#5826)
* Order data export: Allow to filter by product (Z#23212618)

* Fix tests
2026-01-26 09:29:41 +01:00
Phin Wolkwitz
0d6e1e2271 Prefetch program times, add test for query count (#5822) 2026-01-26 08:38:44 +01:00
Raphael Michel
0af011eed4 Web check-in: Show addons of ticket (Z#23220213) (#5827)
* Web check-in: Show addons of ticket (Z#23220213)

* Update src/pretix/plugins/webcheckin/static/pretixplugins/webcheckin/components/app.vue

Co-authored-by: luelista <weller@rami.io>

---------

Co-authored-by: luelista <weller@rami.io>
2026-01-26 08:37:54 +01:00
Raphael Michel
059179aecb Fix babel locale discovery for zh_Hans_US 2026-01-23 11:36:12 +01:00
Raphael Michel
baac963fa8 API: Fix crash in check-in API (PRETIXEU-CT1) (#5806) 2026-01-23 11:17:21 +01:00
Lukas Bockstaller
ed618f2f32 add tiered availability by time (Z#23204747) (#5737)
* add tiered availability by time

* replace bitwise operator

* rephrase help text
2026-01-20 10:32:17 +01:00
Raphael Michel
de9045afcf Allow to combine language variant with region (fixes #3947, Z#23220951) (#5814)
* Allow to combine language variant with region (fixes #3947, Z#23220951)

This only affects babel-based formatting (currently: currencies and phone numbers),
**not** Django-based formatting (currently: date and time formats).

* Remove tests where I don'T actually know whats right

* Fix lookup order
2026-01-16 17:08:46 +01:00
Raphael Michel
0259899e00 Discount: Respect addon grouping in line selection (Z#23220058) (#5782)
* Discount: Respect addon grouping in line selection (Z#23220058)

* Update src/pretix/base/models/discount.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2026-01-16 15:23:59 +01:00
Kian Cross
0fc2d6134f Add option to restrict anonymous access to order URLs (#4735)
* Add option to restrict anonymous access to order URLs

By default, users who place orders while logged in can still access
their order URLs without authentication. This raises potential
security risks, particularly if order confirmation emails are
forwarded.

This commit introduces an organiser-level setting to disable anonymous
access for such orders. When enabled, unauthenticated attempts to access
URLs starting with `/order/`, which are intended for the customer, are
redirected to the login page. Upon successful authentication, the user
is redirected back to the original order URL.

It is important to note that this change does not impact routes intended
for attendees (e.g., `/ticket/*`), which remain accessible without
authentication.

* Change name of setting for future clarity

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* Update message wording

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* Eliminate database query

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* Rename feature flag to fix breaking tests

* Refactor order access verification code into `OrderDetailsMixin`

* Add test for logged-in customer accessing another customer's order

* Refactor order access conditions to remove nesting

* Handle case where customer is not yet verified

* Add additional information to help message

* Fix multidomain issue

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* Merge order/position variants into single tests

* Add docstring explaining return type of `order` property

* Apply suggestion from @raphaelm

* Fix indentation

---------

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Co-authored-by: Raphael Michel <michel@rami.io>
2026-01-16 13:46:08 +01:00
Raphael Michel
c65fecf45e Fix #5765 -- Email rendering: Ampersands and placeholders in URLs (#5766) 2026-01-09 13:01:21 +01:00
Luca Sorace "Stranck
8cc12fa1c7 OrderChangeManager: add_position() returns a handle to the newly created position (#5557)
* OrderChangeManager: Add support for custom operations

* OrderChangeManager: Add callback to AddPosition operation

This is also meant as a way to fix #5548

* Refs #5557: Checkstyle fix

* Refs #5557: Added tests

* Refs #5557: Changes requested in the PR review

* Refs #5557: Fix error in previous merge conflict

* Refs #5557: PR review
2026-01-05 17:34:53 +01:00
Raphael Michel
daaae85865 Fix failing test 2025-12-18 16:11:30 +01:00
Raphael Michel
409e64d5f2 Fix off-by-one error in voucher validation during cart extension (#5716)
* Fix typo in calculation

* Do not double-call extend_expired_positions in tests, make it private
2025-12-18 14:47:56 +01:00
Raphael Michel
e466c4fb72 Refactor validation of cart contents, fix purchase of inactive subevent (Z#23217806) (#5715)
* Refactor validation of cart contents, fix purchase of inactive subevent (Z#23217806)

* Apply suggestions from code review

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Review notes

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2025-12-17 16:59:26 +01:00
Raphael Michel
ffed8b29b1 Bank transfer: Allow CAMT import (#5601) 2025-12-12 08:58:52 +01:00
Raphael Michel
165a47b593 Bank transfer: Auto-ignore all 0-valued transactions (fixes #5168) (#5620)
* Bank transfer: Auto-ignore all 0-valued transactions (fixes #5168)

* Fix failing test
2025-12-09 08:50:04 +01:00
Raphael Michel
c491c8232e Bank transfer: Allow dashes in event slug to be missing (Z#23216859) (#5682)
* Bank transfer: Allow dashes in event slug to be missing (Z#23216859)

* Update src/pretix/plugins/banktransfer/tasks.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Update src/pretix/plugins/banktransfer/tasks.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Apply suggestions from code review

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2025-12-05 10:54:03 +01:00
Raphael Michel
af4eabc800 URL generation: Fix bug if plugins declare both event_urls and organizer_urls (#5688)
* URL generation: Fix bug if plugins declare both event_urls and organizer_urls

* Add missing file

* Add license header
2025-12-05 10:22:28 +01:00
luelista
e1f5678d7c Refactor payment QR code generation code and add SPAYD format (#5680)
Move generation of QR code contents out of the HTML template and into Python code, so it can
be reused in plugins and tested with unit tests. Add the SPAYD QR code format which is used in
Czech Republic and Slovakia [1]. Display BezahlCode QR codes only for German IBANs.

[1] https://en.wikipedia.org/wiki/Short_Payment_Descriptor
2025-12-04 14:15:29 +01:00
Raphael Michel
8d66e1e732 Cart extension: Fix bundled product being removed from cart when sold out (#5690)
Instead, the entire bundle must be removed as it may not be sold
individually.
2025-12-04 11:48:40 +01:00
Raphael Michel
5a1bcae085 Invoice address: Improve VAT ID input (#5647)
* Remove unmaintained depdendency vat_moss

* VAT ID normalization: Auto-add country codes

* VAT ID: County-specific labels

* Invoice address: Allow to set VAT ID as required per country

* Fix failing tests

* Update src/pretix/base/settings.py

Co-authored-by: luelista <weller@rami.io>

* Review fixes

---------

Co-authored-by: luelista <weller@rami.io>
2025-12-03 16:48:19 +01:00
Raphael Michel
9f263fbe4f Hotfix linkified placeholders (#5663)
* Fix linkify placeholders

* Add URL test
2025-11-27 13:20:13 +01:00
Raphael Michel
fdd34f387a [SECURITY] Prevent HTML injection through placeholders in emails
Co-authored-by: luelista <weller@pretix.eu>
2025-11-27 11:41:27 +01:00
Raphael Michel
8f69cb166d [SECURITY] Fix old password not validated on password change 2025-11-26 19:39:32 +01:00
Raphael Michel
9c80f3038a OIDC: Drop scopes validation (fixes #5464) (#5623)
* OIDC: Drop scopes validation (fixes #5464)

* Fix test

* Remove claims as well
2025-11-19 14:39:32 +01:00
Raphael Michel
5eade62121 Bank transfer: Use less cryptic refund references (fixes #4289) (#5626)
* Bank transfer: Use less cryptic refund references (fixes #4289)

* Add condition back in

* Fix tests
2025-11-18 14:52:44 +01:00
Raphael Michel
e2d9cbb41d Add regressiont est for #1832 2025-11-14 18:20:20 +01:00
luelista
a814d31c9b Re-check maximum order size during _perform_order (Z#23213046) (#5586)
* Re-check maximum order size during _perform_order (Z#23213046)

* Add test case
2025-11-14 10:01:51 +01:00
Raphael Michel
eb740204d4 Invoice issuer address: Add state field (#5603)
* Invoice issuer address: Add state field

* Update src/pretix/base/settings.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Update src/pretix/base/models/invoices.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

---------

Co-authored-by: Richard Schreiber <schreiber@rami.io>
2025-11-14 09:56:46 +01:00
luelista
1cb2d443f9 Validation of user email addresses (#5434)
* Validation of user email addresses
* Improve email and password change forms
2025-11-07 11:17:34 +01:00
Phin Wolkwitz
fd9d03786b Add program times for items (Z#23178639)
* Add program times for items

* Fix frontend date validation

* Add ical data for program times [wip]

* Improve ical data for program times

* Remove duplicate code and add comments

* Adjust migration

* Remove program times form for event series

* Add pdf placeholder [wip]

* Improve explanation text with suggestion

Co-authored-by: Raphael Michel <michel@pretix.eu>

* Fix import sorting

* Improve ical generation

* Improve ical entry description

* Fix migration

* Add copyability for program times fot items and events

* Update migration

* Add API endpoints/functions, fix isort

* Improve variable name

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Remove todo comment

* Add documentation, Change endpoint name

* Change related name

* Remove unnecessary code block

* Add program times to item API

* Fix imports

* Add log text

* Use daterange helper

* Add and update API tests

* Add another API test

* Add program times to cloning tests

* Update query count because of program times query

* Invalidate cached tickets on program time changes

* Reduce invalidation calls

* Update migration after rebase

* Apply improvements to invalidation from review

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* remove unneccessary attr=item param

* remove unnecessary kwargs for formset_factory

* fix local var name being overwritten in for-loop

* fix empty formset being saved

* Use subevent if available

* make code less verbose

* remove double event-label in ical desc

* fix unnecessary var re-assign

* fix ev vs p.subevent

---------

Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Richard Schreiber <schreiber@rami.io>
2025-11-06 12:24:47 +01:00
Raphael Michel
3e972eddbf Allow to round taxes on order-level (#5019)
* Allow to round taxes on order-level

* Rename get_cart_total

* Persist rounding mode with order

* Add general docs

* Order creation API

* Update fee algorithm

* Rounding on payment method change

* Round when splitting order

* Fix failing tests

* Add settings page

* Add tests

* Replace algorithm

* Add test case for currency rounding

* Improve order change

* Update flowchart

* Update discount logic (more hypothetical, we don't store rounding on cart positions atm)

* Rename internal method

* Fix typo

* Update help text

* Apply suggestions from code review

Co-authored-by: luelista <weller@rami.io>

* Order rounding refactor (#5571)

* Add RoundingCorrectionMixin providing before-rounding-values as properties

* Use gross_price_before_rounding in more places

* Update doc/development/algorithms/pricing.rst

Co-authored-by: Martin Gross <gross@rami.io>

* Allow to override on perform_order

* Rebase migration

* Fix event cancellation

---------

Co-authored-by: luelista <weller@rami.io>
Co-authored-by: Martin Gross <gross@rami.io>
2025-10-30 11:49:31 +01:00
Raphael Michel
9a69b76880 API: Expose history of check-ins (Z#23206049) 2025-10-30 10:45:01 +01:00
Raphael Michel
4b9f1712f0 Markdown link parser: Fix fediverse URLs and URLs with user or path (#5563) 2025-10-29 10:01:05 +01:00
Raphael Michel
1e0ede529c Event cancellation: Add safety and security checks (#5565)
* Event cancellation: Add safety and security checks

When cancelling an event, a large sum of money might be refunded
instantly. This PR adds safety features around this by

- doing a dry-run first that shows a preview of the expected refund sum

- sending a confirmation mode via email for any automatic refunds of more than 100 currency units

- keeping a more detailed log of the settings this was executed with

* Update src/pretix/control/views/orders.py

Co-authored-by: luelista <weller@rami.io>

---------

Co-authored-by: luelista <weller@rami.io>
2025-10-29 08:53:48 +01:00
Raphael Michel
40db7d939f API: Trust discounts assigned by pretixPOS, do not assign differently (#5531) 2025-10-21 18:35:06 +02:00
Raphael Michel
df9147d207 Order import: Do not allow importing variation for wrong item (Z#23211320) (#5553)
* Order import: Do not allow importing variation for wrong item (Z#23211320)

* Fix test
2025-10-21 09:18:05 +02:00
Phin Wolkwitz
8a3da37b45 Connect giftcards with customer accounts (#5126)
Connect giftcards with customer accounts, show giftcards during checkout and in account , show giftcard list in backend customer view
2025-10-16 13:20:00 +02:00
Raphael Michel
6190b93f89 Stop using ordinal numbers in English date represenation (Z#23210534) (#5539)
* Stop using ordinal numbers in English date represenation (Z#23210534)

* ADjust more tests
2025-10-15 09:06:54 +02:00
Raphael Michel
177a7d07fc Update license header (#5540) 2025-10-10 15:32:46 +02:00
Raphael Michel
2dc772cfcc API: Allow to psas comment when issuing refund 2025-10-10 09:31:47 +02:00
luelista
a823f261f3 Fix unhandled exception in datasync code in case order should not be synced (PRETIXEU-C9H) (#5525)
* Fix unhandled exception in datasync code in case order should not be synced (PRETIXEU-C9H)
* Add test case
2025-10-07 19:58:26 +02:00