Skip to content

Commit

Permalink
Warn if queue addresses are the same as a user address
Browse files Browse the repository at this point in the history
Some admins may want to set the queue's comment or correspondence
address to the same as a user's email address. Such settings can cause
email loops and complications with email signing and key management.

This commit adds a warning to the admin interface when the queue's
comment or correspondence address is the same as a enabled user's email
address.
  • Loading branch information
richieri-bps committed May 10, 2024
1 parent d095c61 commit ec1998f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions share/html/Admin/Queues/Modify.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,18 @@
if ( !$QueueObj->SLADisabled && !( RT->Config->Get('ServiceAgreements') && keys %{RT->Config->Get('ServiceAgreements')}) ) {
push @no_redirect_results, loc("You enabled [_1] but [_2] hasn't been configured in RT_SiteConfig.pm, please check '[_3]' for more help", 'SLA', '%ServiceAgreements', 'docs/customizing/sla.pod');
}
for my $address ( $QueueObj->CorrespondAddress, $QueueObj->CommentAddress ) {
next unless $address;
my $user = RT::User->new( $session{'CurrentUser'} );
$user->LoadByEmail($address);
if ( $user->Id && !$user->Disabled ) {
push @no_redirect_results,
loc(
"The address [_1] is already in use by user [_2]. We recommend that you pick another address to avoid email loops and complications with email signing and key management.",
$address, $user->Name
);
}
}
} else {
$title = loc("Create a queue");
}
Expand Down

0 comments on commit ec1998f

Please sign in to comment.