Skip to content

Fix organiser only decorator for registration views

Sébastiaan Versteeg requested to merge fix/event-registration-fields into master

This is caused by the organiser only check being used which was only made for events. Not registrations. The pk of the registration is used for the comparison thus getting a PermissionDenied for pk values of events that do not exist.

The event Eaque Ea on staging.thalia.nu has this much registrations and you can see that the last few registrations have fields that cannot be edited.

Previous behaviour

Steps to reproduce:

  1. Create an event with information fields.
  2. Create a registration with a pk higher then there are events (you might need a lot of registrations)
  3. Try to edit the fields
  4. Fail

New behaviour

Steps to validate that it works:

  1. Create an event with information fields.
  2. Create a registration with a pk higher then there are events (you might need a lot of registrations)
  3. Try to edit the fields
  4. Success
Edited by Sébastiaan Versteeg

Merge request reports