diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 3d2ee7f8170f495c82349c20ea1c97a921a5d0c5..6ea6c2e0a64dce50fedbb7cb902b572100d0a485 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -250,7 +250,8 @@ sub abort { sub req_select_federation { my ($self, %args) = @_; - $self->check_authentication(action => 'select_federation'); + $self->check_authentication(action => 'select_federation') + if $self->{configuration}->{app}->{login_url}; my $federations = $self->{configuration}->{federations}->{list}; my @federations = split(/, */, $federations); @@ -278,7 +279,8 @@ sub req_select_federation { sub req_select_sp { my ($self, %args) = @_; - $self->check_authentication(action => 'select_sp'); + $self->check_authentication(action => 'select_sp') + if $self->{configuration}->{app}->{login_url}; my $federation = $self->{cgi}->param('federation'); # not mandatory @@ -318,7 +320,8 @@ sub req_select_sp { sub req_select_email { my ($self, %args) = @_; - $self->check_authentication(action => 'select_email'); + $self->check_authentication(action => 'select_email') + if $self->{configuration}->{app}->{login_url}; my $entityid = $self->get_parameter(name => 'entityid'); my $federation = $self->{cgi}->param('federation'); # not mandatory @@ -402,7 +405,8 @@ sub req_select_email { sub req_complete_challenge { my ($self, %args) = @_; - $self->check_authentication(action => 'complete_challenge'); + $self->check_authentication(action => 'complete_challenge') + if $self->{configuration}->{app}->{login_url}; my $entityid = $self->get_parameter(name => 'entityid'); my $email = $self->get_parameter(name => 'email'); @@ -587,7 +591,8 @@ sub req_complete_challenge { sub req_create_accounts { my ($self, %args) = @_; - $self->check_authentication(action => 'create_accounts'); + $self->check_authentication(action => 'create_accounts') + if $self->{configuration}->{app}->{login_url}; my $entityid = $self->get_parameter(name => 'entityid'); my $token = $self->get_parameter(name => 'token'); @@ -691,7 +696,8 @@ sub req_create_accounts { sub req_download_accounts { my ($self) = @_; - $self->check_authentication(action => 'download_accounts'); + $self->check_authentication(action => 'download_accounts') + if $self->{configuration}->{app}->{login_url}; my $entityid = $self->get_parameter(name => 'entityid'); my $token = $self->get_parameter(name => 'token'); diff --git a/templates/web/edugain/home.tt2.html b/templates/web/edugain/home.tt2.html index c4b5d8302d729a4d32f24dfcdc0fc50f14408782..30d958e598c423c9b3033e7d550517884dcae519 100644 --- a/templates/web/edugain/home.tt2.html +++ b/templates/web/edugain/home.tt2.html @@ -9,6 +9,6 @@ <h2>[% lh.maketext("Get started") %]</h2> <p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p> -<p class="text-center"><a href="[% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p> +<p class="text-center"><a href="[% IF app.login_url %][% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation[% ELSE %][% app.url %]?action=select_federation[% END %]" class="button">[% lh.maketext("Get started") %]</a></p> [% END %] diff --git a/templates/web/renater/home.tt2.html b/templates/web/renater/home.tt2.html index dde4a7b91d3d1542280e570ca1e458be54a21240..f701225994c20e848af906d35b03efcbcca5fbea 100644 --- a/templates/web/renater/home.tt2.html +++ b/templates/web/renater/home.tt2.html @@ -9,6 +9,6 @@ <h2>[% lh.maketext("Get started") %]</h2> <p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p> -<p class="text-center"><a href="[% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p> +<p class="text-center"><a href="[% IF app.login_url %][% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation[% ELSE %][% app.url %]?action=select_federation[% END %]" class="button">[% lh.maketext("Get started") %]</a></p> [% END %]