[Rt-commit] r9586 - in rt/branches/3.7-EXPERIMENTAL: . html/Ticket

ruz at bestpractical.com ruz at bestpractical.com
Tue Nov 6 07:08:06 EST 2007


Author: ruz
Date: Tue Nov  6 07:08:05 2007
New Revision: 9586

Removed:
   rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPGSignIssues
Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPGKeyIssues
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html

Log:
 r9358 at cubic-pc (orig r9357):  sartak | 2007-10-19 21:09:56 +0400
  r43879 at onn:  sartak | 2007-10-19 13:09:44 -0400
  Factor GnuPGSignIssues into GnuPGKeyIssues
 


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPGKeyIssues
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPGKeyIssues	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPGKeyIssues	Tue Nov  6 07:08:05 2007
@@ -45,8 +45,18 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-% if ( @$Issues ) {
+% if ( @$Issues || @$SignAddresses ) {
 <&| /Widgets/TitleBox, title => loc('GnuPG issues') &>
+
+% if ( @$SignAddresses ) {
+<% loc("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 addresses are:") %>
+<ul>
+% for my $address (@$SignAddresses) {
+    <li><% $address %></li>
+% }
+</ul>
+% }
+
 % if (@$Issues == 1) {
 <% loc("You are going to encrypt outgoing email messages, but there is a problem with a recipient's public key. You have to fix the problem with the key, disable sending a message to that recipient, or disable encryption.") %>
 % } else {
@@ -77,5 +87,6 @@
 
 <%ARGS>
 $Issues => []
+$SignAddresses => []
 </%ARGS>
 

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html	Tue Nov  6 07:08:05 2007
@@ -57,11 +57,7 @@
 <input type="hidden" class="hidden" name="id" value="new" />
 % $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
 
-% if ($cannot_sign) {
-<& /Elements/GnuPGSignIssues &>
-% }
-
-<& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues &>
+<& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues, SignAddresses => \@cannot_sign_as &>
 
 <div id="Ticket-Create-basics">
 <a name="basics"></a>
@@ -319,7 +315,7 @@
 }
 
 my $checks_failure = 0;
-my $cannot_sign = 0;
+my @cannot_sign_as;
 my @gnupg_keys_issues;
 
 if (RT->Config->Get('GnuPG')->{'Enable'}) {
@@ -330,8 +326,9 @@
 
     # check to see if we have a good passphrase
     if ( $ARGS{'Sign'} ) {
-        if (!RT::Crypt::GnuPG::DrySign($QueueObj->CorrespondAddress, "x")) {
-            $cannot_sign = 1;
+        my $address = $QueueObj->CorrespondAddress;
+        if (!RT::Crypt::GnuPG::DrySign($address, "x")) {
+            push @cannot_sign_as, $address;
             $checks_failure = 1;
         }
     }

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html	Tue Nov  6 07:08:05 2007
@@ -60,11 +60,7 @@
 <input type="hidden" class="hidden" name="DefaultStatus" value="<% $DefaultStatus ||''%>" />
 <input type="hidden" class="hidden" name="Action" value="<% $ARGS{Action}||'' %>" />
 
-% if ($cannot_sign) {
-<& /Elements/GnuPGSignIssues &>
-% }
-
-<& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues &>
+<& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues, SignAddresses => \@cannot_sign_as &>
 
 <table border="0">
 
@@ -249,7 +245,7 @@
 # }}}
 
 my @results;
-my $cannot_sign = 0;
+my @cannot_sign_as;
 my @gnupg_keys_issues;
 
 if (RT->Config->Get('GnuPG')->{'Enable'}) {
@@ -264,7 +260,7 @@
                     ? $TicketObj->QueueObj->CommentAddress
                     : $TicketObj->QueueObj->CorrespondAddress;
         if (!RT::Crypt::GnuPG::DrySign($address, "x")) {
-            $cannot_sign = 1;
+            push @cannot_sign_as, $address;
             $checks_failure = 1;
         }
     }


More information about the Rt-commit mailing list