emile 1 year ago
parent 7cfd43a8c4
commit e75f9400bc

@ -207,6 +207,7 @@ def customer_ticket_details(request, ticket_number):
ticket = get_object_or_404(Ticket, ticket_number=ticket_number)
# Check if the logged-in user is the customer associated with the ticket
if request.user.is_authenticated:
if ticket.customer != request.user.customerprofile:
raise Http404("Page not found.")

Loading…
Cancel
Save