summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rt/etc/RT_Config.pm12
-rw-r--r--rt/etc/RT_Config.pm.in12
-rw-r--r--rt/lib/RT/Interface/Web_Vendor.pm8
3 files changed, 32 insertions, 0 deletions
diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm
index 499505371..b4ca44c96 100644
--- a/rt/etc/RT_Config.pm
+++ b/rt/etc/RT_Config.pm
@@ -341,6 +341,18 @@ made of multiple email adresses.
Set($ValidateUserEmailAddresses, undef);
+=item C<$NonCustomerEmailRegexp>
+
+Normally, when a ticket is linked to a customer, any requestors on that
+ticket that didn't previously have customer memberships are linked to
+the customer also. C<$NonCustomerEmailRegexp> is a regexp for email
+addresses that should I<not> automatically be linked to a customer in
+this way.
+
+=cut
+
+Set($NonCustomerEmailRegexp, undef);
+
=item C<@MailPlugins>
C<@MailPlugins> is a list of auth plugins for L<RT::Interface::Email>
diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in
index ae1bc888d..94eea5ade 100644
--- a/rt/etc/RT_Config.pm.in
+++ b/rt/etc/RT_Config.pm.in
@@ -341,6 +341,18 @@ made of multiple email adresses.
Set($ValidateUserEmailAddresses, undef);
+=item C<$NonCustomerEmailRegexp>
+
+Normally, when a ticket is linked to a customer, any requestors on that
+ticket that didn't previously have customer memberships are linked to
+the customer also. C<$NonCustomerEmailRegexp> is a regexp for email
+addresses that should I<not> automatically be linked to a customer in
+this way.
+
+=cut
+
+Set($NonCustomerEmailRegexp, undef);
+
=item C<@MailPlugins>
C<@MailPlugins> is a list of auth plugins for L<RT::Interface::Email>
diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm
index 129f69fab..ee8c34b55 100644
--- a/rt/lib/RT/Interface/Web_Vendor.pm
+++ b/rt/lib/RT/Interface/Web_Vendor.pm
@@ -118,6 +118,14 @@ sub ProcessTicketCustomers {
}
###
+ #remove any declared non-customer addresses
+ ###
+
+ my $exclude_regexp = RT->Config->Get('NonCustomerEmailRegexp');
+ @Requestors = grep { not $_->EmailAddress =~ $exclude_regexp } @Requestors
+ if defined $exclude_regexp;
+
+ ###
#link ticket (and requestors) to customers
###