[Rt-commit] r10100 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Mon Dec 24 18:51:33 EST 2007
Author: ruz
Date: Mon Dec 24 18:51:33 2007
New Revision: 10100
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SelectKeyForSigning
Log:
r9921 at cubic-pc (orig r9920): ruz | 2007-12-12 22:42:47 +0300
* implement PrivateKey in the UI
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SelectKeyForSigning
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SelectKeyForSigning (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SelectKeyForSigning Mon Dec 24 18:51:33 2007
@@ -1,9 +1,11 @@
+% if ( $user_key ) {
<select name="<% $Name %>">
<option value=""><% loc("Queue's key") %></option>
-% foreach my $key ( @keys ) {
-<option value="<% $key->{'Key'} %>"><% $key->{'Key'} %></option>
-% }
+<option value="<% $user_key %>"><% $user_key %></option>
</select>
+% } else {
+<% loc("Queue's key") %>
+% }
<%ARGS>
$Name => 'SignUsing',
$User => undef,
@@ -11,9 +13,5 @@
<%INIT>
return unless RT->Config->Get('GnuPG')->{'Enable'};
-my @keys;
-if ( my $address = $User->EmailAddress ) {
- my %res = RT::Crypt::GnuPG::GetKeysForSigning( $address );
- push @keys, @{ $res{'info'} } if $res{'info'};
-}
+my $user_key = $User->PrivateKey;
</%INIT>
More information about the Rt-commit
mailing list