
sartak at bestpractical
Nov 23, 2009, 7:28 PM
Post #1 of 1
(92 views)
Permalink
|
|
rt branch, 3.999-trunk, updated. 202d051d14c304ea1510353412522079c2ea5453
|
|
The branch, 3.999-trunk has been updated via 202d051d14c304ea1510353412522079c2ea5453 (commit) via 86635dd7090712fa33eceb9a462e909faed971a8 (commit) from f2248c4a195b7faa1259d1c7bc5d1adfe8fa7a74 (commit) Summary of changes: lib/RT/Action/ConfigSystem.pm | 17 ++++++++++++++--- t/web/gnupg-outgoing.t | 22 ++++++++++++---------- 2 files changed, 26 insertions(+), 13 deletions(-) - Log ----------------------------------------------------------------- commit 86635dd7090712fa33eceb9a462e909faed971a8 Author: Shawn M Moore <sartak [at] bestpractical> Date: Mon Nov 23 22:25:27 2009 -0500 Give a better error when the gpg homedir doesn't exist diff --git a/lib/RT/Action/ConfigSystem.pm b/lib/RT/Action/ConfigSystem.pm index d177d04..932e702 100644 --- a/lib/RT/Action/ConfigSystem.pm +++ b/lib/RT/Action/ConfigSystem.pm @@ -147,11 +147,22 @@ sub validate_gnupg { if ( $value->{enable} ) { my $gpgopts = $self->argument_value('gnupg_options') || RT->config->get('gnupg_options') || {}; - unless ( -d $gpgopts->{homedir} && -r _ ) { # no homedir, no gpg + + # no homedir, no gpg + my $homedir = $gpgopts->{homedir}; + unless ( -d $homedir ) { + return $self->validation_error( + gnupg => _( +"your configured GnuPG home directory does not exist: '%1'", + $homedir + ) + ); + } + unless ( -r $homedir ) { return $self->validation_error( gnupg => _( -"couldn't successfully read your configured GnuPG home directory: '%1'", - $gpgopts->{homedir} +"couldn't read your configured GnuPG home directory: '%1'", + $homedir ) ); } commit 202d051d14c304ea1510353412522079c2ea5453 Author: Shawn M Moore <sartak [at] bestpractical> Date: Mon Nov 23 22:27:47 2009 -0500 Use action_field_input since it handles J:A:F-style names diff --git a/t/web/gnupg-outgoing.t b/t/web/gnupg-outgoing.t index e5d1c66..b5a53e8 100644 --- a/t/web/gnupg-outgoing.t +++ b/t/web/gnupg-outgoing.t @@ -74,16 +74,17 @@ diag "check in read-only mode that queue's props influence create/update ticket foreach my $variant ( @variants ) { set_queue_crypt_options( %$variant ); $m->goto_create_ticket( $queue ); - my $form = $m->action_form('create_ticket'); + my $encrypt = $m->action_field_input('create_ticket', 'encrypt'); + my $sign = $m->action_field_input('create_ticket', 'sign'); if ( $variant->{'encrypt'} ) { - ok $form->value('encrypt'), "encrypt tick box is checked"; + ok $encrypt->value('encrypt'), "encrypt tick box is checked"; } else { - ok !$form->value('encrypt'), "encrypt tick box is unchecked"; + ok !$encrypt->value('encrypt'), "encrypt tick box is unchecked"; } if ( $variant->{'sign'} ) { - ok $form->value('sign'), "sign tick box is checked"; + ok $sign->value('sign'), "sign tick box is checked"; } else { - ok !$form->value('sign'), "sign tick box is unchecked"; + ok !$sign->value('sign'), "sign tick box is unchecked"; } } @@ -102,16 +103,17 @@ diag "check in read-only mode that queue's props influence create/update ticket set_queue_crypt_options( %$variant ); $m->goto_ticket( $id ); $m->follow_link_ok({text => 'Reply'}, '-> reply'); - my $form = $m->action_form('create_ticket'); + my $encrypt = $m->action_field_input('create_ticket', 'encrypt'); + my $sign = $m->action_field_input('create_ticket', 'sign'); if ( $variant->{'encrypt'} ) { - ok $form->value('encrypt'), "encrypt tick box is checked"; + ok $encrypt->value('encrypt'), "encrypt tick box is checked"; } else { - ok !$form->value('encrypt'), "encrypt tick box is unchecked"; + ok !$encrypt->value('encrypt'), "encrypt tick box is unchecked"; } if ( $variant->{'sign'} ) { - ok $form->value('sign'), "sign tick box is checked"; + ok $sign->value('sign'), "sign tick box is checked"; } else { - ok !$form->value('sign'), "sign tick box is unchecked"; + ok !$sign->value('sign'), "sign tick box is unchecked"; } } } ----------------------------------------------------------------------- _______________________________________________ Rt-commit mailing list Rt-commit [at] lists http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|