mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add API endpoint /seats to event (Z#23159536) (#4321)
* add API endpoint /seats to event
* fix logging
* add Seat annotations
* add seats endpoint for subevents
* return ids of occupying objects instead of boolean flags
* wip
* include orderposition instead of order in seat info
* add API documentation
* Apply suggestions from code review
Co-authored-by: Raphael Michel <michel@rami.io>
* Apply suggestions from code review
* Clarify API docs
* add api examples
* add test cases
* require can_view_orders permission for retrieving seats
* improve permission handling
* Revert "improve permission handling"
This reverts commit f32b532cc6.
* improve permission handling (minimal version)
* formatting
* add permission tests
* fix bug
* update permission checks
* Apply suggestions from code review
Co-authored-by: Raphael Michel <michel@rami.io>
* add tests for permission checks
* add tests for expand=voucher and expand=cartposition
* remove unused parameter
* test query count
* codestyle
---------
Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -54,6 +54,7 @@ event_urls = [
|
||||
(None, 'taxrules/'),
|
||||
('can_view_orders', 'waitinglistentries/'),
|
||||
('can_view_orders', 'checkinlists/'),
|
||||
(None, 'seats/'),
|
||||
]
|
||||
|
||||
event_permission_sub_urls = [
|
||||
@@ -191,6 +192,12 @@ event_permission_sub_urls = [
|
||||
('post', 'can_change_event_settings', 'item_meta_properties/', 400),
|
||||
('patch', 'can_change_event_settings', 'item_meta_properties/0/', 404),
|
||||
('delete', 'can_change_event_settings', 'item_meta_properties/0/', 404),
|
||||
('get', None, 'seats/', 200),
|
||||
('get', 'can_view_orders', 'seats/?expand=orderposition', 200),
|
||||
('get', 'can_view_orders', 'seats/?expand=cartposition', 200),
|
||||
('get', 'can_view_vouchers', 'seats/?expand=voucher', 200),
|
||||
('get', None, 'seats/1/', 404),
|
||||
('patch', 'can_change_event_settings', 'seats/1/', 404),
|
||||
]
|
||||
|
||||
org_permission_sub_urls = [
|
||||
@@ -254,6 +261,7 @@ org_permission_sub_urls = [
|
||||
('get', 'can_change_teams', 'teams/{team_id}/tokens/0/', 404),
|
||||
('delete', 'can_change_teams', 'teams/{team_id}/tokens/0/', 404),
|
||||
('post', 'can_change_teams', 'teams/{team_id}/tokens/', 400),
|
||||
('get', 'can_manage_reusable_media', 'reusablemedia/1/', 404),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user