Email suggestions while creating a tickets

Hello,
I have encountered the following problem:
While creating a ticket (or even replying to ticket, commenting, etc.) there are mail suggestions.
These are no standard checkboxes, but when you start typing for example ‘use’, there is suggestion on the drop down list to add user@gmail.com.
It is really useful, however users might see email of other queues’ members and that is quite a problem.
Do you know any tips how to remove these suggestions or how to disable users from other Queues to pop up?
I saw no such right or config option to set.
Thanks in advance!

By default I believe RT autocompletes any user, you could look to use the callback in the share/html/Helpers/Autocomplete/Users ModifySuggestion to try and hide results though

I’ve been working through a checklist of things that need to be sorted before allowing external privileged access to a queue - for example allowing user@clienta to access queue(a). The queue / tickets / privileged User population / visibility is all working well; the only sticking point I have currently is this one. As far as I can tell there’s no “hook” in the permissions framework for the Right “SeeUsers”, in the same way that there is for “SeeQueue|CustomField|Class|…”.

Note: the privileged user dropdown is correctly restricting the users available to select for assigning as Owner. This is just for the Email Address autocomplete for Privileged users.

Are there any examples I can reference out there on what would be required to allow the ModifySuggestions to be restricted based upon data in the system or “@not_in”. I think knation is referring to something like:

my @not_in = split /\s*,\s*/, $exclude;
$Users->Limit(
    FIELD           => 'id',
    VALUE           => \@not_in,
    OPERATOR        => 'NOT IN',
    ENTRYAGGREGATOR => 'AND',
    SUBCLAUSE       => 'excludeautocomplete'
) if @not_in;

but using Group / Role / Privilege / CustomField? For example:
User(a) has Role(b) | Privilege (c) on queue (q)

and so can see Users that interact with the queue?

Unfortunately I have no Perl ability beyond pseudocode…

On a tangent, I think the way you’d end up doing so in the ACL table is something like:

+------+---------------+-------------+------------------+------------+----------+
| id   | PrincipalType | PrincipalId | RightName        | ObjectType | ObjectId |
+------+---------------+-------------+------------------+------------+----------+
| 999 | Group         |     123456 | SeeUser     | RT::User |        10 |
| 1234 | Group         |       234567 | SeeUser       | RT::User |        11 |
| 1722 | Group         |       3456 | SeeUser       | RT::Queue |        789 |
| 3056 | Group         |         7890 | SeeUser | RT::Group |        99 |
+------+---------------+-------------+------------------+------------+----------+

But I can’t see corresponding data structures in the ACL or other tables (for example there is no RightName “SeeUser” and no ObjectType RT::User ).