[Rt-commit] r9063 -
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident
ruz at bestpractical.com
ruz at bestpractical.com
Sat Sep 15 18:43:20 EDT 2007
Author: ruz
Date: Sat Sep 15 18:43:19 2007
New Revision: 9063
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
Log:
* add checks for keys to Incident/Create
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html Sat Sep 15 18:43:19 2007
@@ -63,6 +63,8 @@
% }
<a name="top" />
+<& /Elements/GnuPGKeyIssues, Issues => \@gnupg_keys_issues &>
+
<&| /Widgets/TitleBox, title => $Title &>
<table border="0" cellpadding="0" cellspacing="2">
@@ -231,6 +233,26 @@
$m->comp( '/RTIR/Create.html:ProcessAttachments', %ARGS );
my $checks_failure = 0;
+
+my @gnupg_keys_issues;
+if ( $CreateIncident && $ARGS{'Encrypt'} ) {
+
+ my @recipients = $m->comp(
+ '/Ticket/Elements/PreviewScrips:GetRecipientsOnCreate',
+ %ARGS
+ );
+
+ RT::Crypt::GnuPG::UseKeyForEncryption(
+ map { (/^UseKey-(.*)$/)[0] => $ARGS{ $_ } }
+ grep $ARGS{$_} && /^UseKey-/,
+ keys %ARGS
+ );
+
+ my $status;
+ ($status, @gnupg_keys_issues) = RT::Crypt::GnuPG::CheckRecipients( @recipients );
+ $checks_failure = 1 unless $status;
+}
+
if ( $CreateIncident ) {
my ($status, @msg) = $m->comp('/Elements/ValidateCustomFields',
CustomFields => $QueueObj->TicketCustomFields,
More information about the Rt-commit
mailing list