[Rt-commit] rt branch, 3.999-trunk, updated. 0741ad2380da9f1e7b61eff77e79c5d8dc3ce876

sartak at bestpractical.com sartak at bestpractical.com
Wed Nov 25 06:44:43 EST 2009


The branch, 3.999-trunk has been updated
       via  0741ad2380da9f1e7b61eff77e79c5d8dc3ce876 (commit)
      from  20f2f2a8f0673809389ebc55aa2a8c12a1afc953 (commit)

Summary of changes:
 lib/RT/Action/CreateTicket.pm |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 0741ad2380da9f1e7b61eff77e79c5d8dc3ce876
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Nov 25 06:44:28 2009 -0500

    Canonicalize empty address to the queue's correspond address

diff --git a/lib/RT/Action/CreateTicket.pm b/lib/RT/Action/CreateTicket.pm
index ec0fe6c..4a3e77f 100644
--- a/lib/RT/Action/CreateTicket.pm
+++ b/lib/RT/Action/CreateTicket.pm
@@ -209,17 +209,25 @@ sub setup_gnupg {
     ));
 }
 
+sub canonicalize_sign_using {
+    my $self = shift;
+    my $address = shift;
+
+    return $address if length $address;
+
+    my $queue_id = $self->argument_value('queue');
+    my $queue = RT::Model::Queue->new;
+    $queue->load($queue_id);
+
+    return $queue->correspond_address;
+}
+
 sub validate_sign_using {
     my $self    = shift;
     my $address = shift;
 
     return if !$self->argument_value('sign');
 
-    # XXX: how should this fit into RT4?
-    #$address ||= ($self->{'update_type'} && $self->{'update_type'} eq "private")
-    #    ? ( $queue_obj->comment_address || RT->config->get('comment_address') )
-    #    : ( $queue_obj->correspond_address || RT->config->get('correspond_address') );
-
     unless ( RT::Crypt::GnuPG::dry_sign($address) ) {
         return $self->validation_error(sign_using => _("The system is unable to sign outgoing email messages. This usually indicates that the passphrase was mis-set, or that GPG Agent is down. Please alert your system administrator immediately. The problem address is: %1", $address));
     } else {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list