A user cannot answer to a ticket by email if he has no default organization with the permission to create tickets #954
Labels
easy task
Good for first time contributors
ready ✅
You can work on this!
topic: emails
All the stuff related to the emails system
topic: ticketing
All the stuff related to the tickets
Milestone
Problem
We have a case where a user is only "invited" in an organization. This user cannot create tickets as he's not a customer. But he can answer to the tickets in which he's observer. When the user answers to a ticket by email, Bileto complains because "sender has not permission to create tickets".
How to reproduce
What was expected?
The email should be accepted and the answer added to the ticket.
Solution
This is because of these lines: https://github.com/Probesys/bileto/blob/main/src/MessageHandler/CreateTicketsFromMailboxEmailsHandler.php#L125-L131
We shouldn't check if the user has an organization if he's answering to an existing ticket.
We must move the condition below:
The text was updated successfully, but these errors were encountered: