Hi Nicholas,
Filing this as a small inconsistency in the mail gateway with a patch attached if it is helpful.
The inconsistency
In the web UI, ATS lets staff invite additional users to a ticket (via the existing #__ats_tickets_users table), and Permissions::isInvited() is the public helper that checks for it. Invited users can read the ticket and reply via the portal.
The mail gateway, however, only honors $ticket->created_by when deciding whether a reply email is valid. An invited user replying via email gets the mailgateway_noaccess "Inadequate permissions" response, even though they could reply on the same ticket via the portal a moment later.
This is conceptually similar to how the existing AddonEmails feature lets one user reply from multiple email addresses — extending the From-address resolution to honor invited users feels like a natural symmetry.
Real-world scenario
Our agency runs a single ATS instance. Typical flow:
- Charlotte (a client's marketing lead) opens a ticket about a compliance question.
- The scope grows and Charlotte invites Kevin (their consultant) and Mike (their dev) so they can collaborate on the same ticket.
- Kevin replies to the latest notification email.
- ATS rejects with "Inadequate permissions."
Kevin can post on the portal, but for clients email is the path of least friction — and the system has already invited him into the conversation.
Proposed fix
Two changes to plugins/ats/mailfetch/src/Fetcher/EmailCheck.php (patch attached, against ATS 5.5.0):
1. passedBasicChecks() — extend the existing creator/manager gate to also accept invited users:
if (!$isNewTicket && !$isManager && ($user->id != $ticket->created_by)
&& !Permissions::isInvited($ticket->getId(), $user->id))
{
// Reject with mailgateway_noaccess
}
2. processEmail() reply branch — preserve the meaning of $myTicket (a client-side reply: status → O, no auto-assignment) by treating an invited user the same as the ticket creator:
$myTicket = ($user->id == $ticket->created_by)
|| Permissions::isInvited($ticket->getId(), $user->id);
Without the second change, an invited user's reply would flip status to P and auto-assign to themselves — which is the manager-reply behavior, not what we want.
Permissions::isInvited() is already imported in this file (the same import is used for isManager, getUser, etc.), so there are no new dependencies.
Alternative shapes
Happy to reshape if you prefer not to turn this on by default:
- Opt-in flag in
plg_ats_mailfetchparams — e.g.,replyfrominvited("Allow invited users to reply by email") - Combine with
emailadminonlyso the existing manager-only switch could optionally include invitees
Either is a small follow-up.
Tested against
ATS 5.5.0 on Joomla 5.4. Applied to our production instance. Creator-replies and manager-replies behave unchanged; invited-user replies now post correctly with status O.
Best, Brian