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
Branches
Tags
No related merge requests found
...@@ -68,7 +68,6 @@ for ($action) { ...@@ -68,7 +68,6 @@ for ($action) {
when ('get_authentication_token') { get_authentication_token() } when ('get_authentication_token') { get_authentication_token() }
when ('list_authentication_tokens') { list_authentication_tokens() } when ('list_authentication_tokens') { list_authentication_tokens() }
when ('parse_federation_metadata') { parse_federation_metadata() } when ('parse_federation_metadata') { parse_federation_metadata() }
when ('send_notice') { send_notice() }
default { default {
pod2usage( pod2usage(
-message => "invalid action '$action', aborting\n", -message => "invalid action '$action', aborting\n",
...@@ -330,38 +329,6 @@ sub add_authentication_token { ...@@ -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__ __END__
=head1 NAME =head1 NAME
...@@ -404,9 +371,6 @@ B<account-manager-client.pl> B<add_authentication_token> ...@@ -404,9 +371,6 @@ B<account-manager-client.pl> B<add_authentication_token>
S<B<--sp_entityid> I<string>> S<B<--sp_entityid> I<string>>
S<B<--email_address> I<string>> S<B<--email_address> I<string>>
B<account-manager-client.pl> B<send_notice>
S<B<--email_address> I<string>>
=head1 DESCRIPTION =head1 DESCRIPTION
The Test Account manager instanciates test accounts associated to a SAML The Test Account manager instanciates test accounts associated to a SAML
...@@ -468,10 +432,6 @@ Get informations on a token. ...@@ -468,10 +432,6 @@ Get informations on a token.
Adds a new test account. 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 \ $> account-manager-client.pl add_service_provider \
--sp_entityid https://test.federation.renater.fr/test/ressource \ --sp_entityid https://test.federation.renater.fr/test/ressource \
--displayname 'Test SP' --contacts email1@dom,email2@dom --displayname 'Test SP' --contacts email1@dom,email2@dom
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment