Skip to content
Snippets Groups Projects
Commit b3b3dc77 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

kill send_notice action

It doesn't make sense to send an error notification without an explicit
error...
parent 69c77869
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,6 @@ for ($action) {
when ('get_authentication_token') { get_authentication_token() }
when ('list_authentication_tokens') { list_authentication_tokens() }
when ('parse_federation_metadata') { parse_federation_metadata() }
when ('send_notice') { send_notice() }
default {
pod2usage(
-message => "invalid action '$action', aborting\n",
......@@ -330,38 +329,6 @@ sub add_authentication_token {
}
sub send_notice {
pod2usage(
-message => "missing email_address option, aborting\n",
-verbose => 0
) unless $options{email_address};
Log::Any::Adapter->set(
'File',
$self->{configuration}->{log_file},
log_level => $self->{configuration}->{log_level}
);
my $logger = Log::Any->get_logger();
die "Failed to send mail notice to $options{email_address}\n"
unless IdPAccountManager::Tools::mail_notice(
template => 'templates/mail/notification_generic_error.tt2.eml',
templates_dir => $configuration->{templates_dir},
data => {},
to => $options{email_address},
logger => $logger,
admin_email => $configuration->{admin_email},
dev_no_mail_outside => $configuration->{dev_no_mail_outside},
dev_sp_contact => $configuration->{dev_sp_contact},
notice_from => $configuration->{notice_from}
);
printf "Mail notice sent to $options{email_address}\n";
}
__END__
=head1 NAME
......@@ -404,9 +371,6 @@ B<account-manager-client.pl> B<add_authentication_token>
S<B<--sp_entityid> I<string>>
S<B<--email_address> I<string>>
B<account-manager-client.pl> B<send_notice>
S<B<--email_address> I<string>>
=head1 DESCRIPTION
The Test Account manager instanciates test accounts associated to a SAML
......@@ -468,10 +432,6 @@ Get informations on a token.
Adds a new test account.
$> account-manager-client.pl send_notice --email_address=john@my.fqdn
Sends a mail notice to the specified email address.
$> account-manager-client.pl add_service_provider \
--sp_entityid https://test.federation.renater.fr/test/ressource \
--displayname 'Test SP' --contacts email1@dom,email2@dom
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment