From 185430f0ef44b58d8cc97df26a3f1f20e2a1f1e2 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Fri, 23 Feb 2018 16:16:05 +0100 Subject: [PATCH] usage of banner depends on context, not content --- lib/AccountManager/WebRequest.pm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/AccountManager/WebRequest.pm b/lib/AccountManager/WebRequest.pm index 8df7ac3..e66f619 100644 --- a/lib/AccountManager/WebRequest.pm +++ b/lib/AccountManager/WebRequest.pm @@ -211,7 +211,7 @@ sub req_select_email { unless ($self->{in}->{entityid}) { $self->{logger}->error("Missing parameter entityid"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "missing_entityid" ] @@ -239,7 +239,7 @@ sub req_select_email { if ($EVAL_ERROR) { $self->{logger}->error("Failed to load federation metadata: $EVAL_ERROR"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "internal" ] @@ -253,7 +253,7 @@ sub req_select_email { "No such SP '%s' in metadata", $self->{in}->{entityid} ); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "no_such_entity" ] @@ -271,7 +271,7 @@ sub req_select_email { unless ($provider->save()) { $self->{logger}->error("Failed to save service provider object"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "internal" ] @@ -310,7 +310,7 @@ sub req_complete_challenge { unless ($self->{in}->{entityid}) { $self->{logger}->error("Missing parameter entityid"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { errors => [ "missing_entityid" ] } @@ -320,7 +320,7 @@ sub req_complete_challenge { unless ($self->{in}->{email}) { $self->{logger}->error("Missing parameter email"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "missing_email" ] @@ -336,7 +336,7 @@ sub req_complete_challenge { unless ($provider->load(speculative => 1)) { $self->{logger}->errorf("No such SP '%s' in database", $self->{in}->{entityid}); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "no_such_entity" ] @@ -368,7 +368,7 @@ sub req_complete_challenge { $self->{in}->{email} ); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "internal" ] @@ -390,7 +390,7 @@ sub req_complete_challenge { $old_token->id() ); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "internal" ] @@ -414,7 +414,7 @@ sub req_complete_challenge { unless ($token->save()) { $self->{logger}->error("Failed to save authentication token"); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "internal" ] @@ -430,7 +430,7 @@ sub req_complete_challenge { open(my $handle, '|-', "$sendmail -f $sender $recipient") or do { $self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "mail_notification_error" ] @@ -461,7 +461,7 @@ sub req_complete_challenge { unless ($tt2->process($template, $data, $handle)) { $self->{logger}->errorf("Mail notification error: %s", $tt2->error()); $self->respond( - template => 'index.tt2.html', + template => 'index-nobanner.tt2.html', data => { content => 'errors.tt2.html', errors => [ "mail_notification_error" ] -- GitLab