svthalia / concrexit

Thalia Website built on Django.
https://thalia.nu
Other
22 stars 11 forks source link

3714 Fix not able to order when not allowed #3718

Closed BPC2004 closed 3 weeks ago

BPC2004 commented 4 weeks ago

Closes #3714.

Summary

Made it so that you are not able to order food when the ordering has not started or the event has ended. Also fixed that you were able to order food to registration required events if you are not registered or are in the queue of the event you are ordering food at.

How to test

Make a new Food event and set the time to expire in like a minute. Try to order food when the food event has ended if you are back to the index page of pizza, then this is correct. You should not be able to order food when the event has expired. Make a new food event and do not register for the event that requires registration, then try to order food if you are redirected to the index page of pizza, this is correct. You should again not be able to order food.