Fix organiser only decorator for registration views
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:
- Create an event with information fields.
- Create a registration with a pk higher then there are events (you might need a lot of registrations)
- Try to edit the fields
- Fail
New behaviour
Steps to validate that it works:
- Create an event with information fields.
- Create a registration with a pk higher then there are events (you might need a lot of registrations)
- Try to edit the fields
- Success
Edited by Sébastiaan Versteeg