From 3e9ffbeb783145b7eadcada8029d99c233a1e56c Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Tue, 27 Sep 2022 09:20:49 -0300 Subject: [PATCH] Bug 31378: Add STAFF support for authentication providers --- .../intranet-tmpl/prog/en/modules/auth.tt | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index e2db5e0f30..c83673d4a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -5,6 +5,7 @@ [% USE Desks %] [% USE Categories %] [% USE Registers %] +[% USE AuthClient %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -14,7 +15,8 @@ [% ELSIF invalid_username_or_password %]Invalid username or password[% END %] [% IF ( different_ip ) %]IP address change[% END %] [% IF ( timed_out ) %]Session timed out[% END %] - [% IF ( nopermission ) %]Access denied[% END %] › Koha + [% IF ( nopermission ) %]Access denied[% END %] + [% IF ( auth_error ) %]Error authenticating in external provider[% END %] › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -63,6 +65,13 @@
Error: Invalid username or password
[% END %] +[% IF auth_error %] +
+

There was an error authenticating to external identity provider

+

[% auth_error | html %]

+
+[% END %] + [% IF (shibbolethAuthentication) %] [% IF (invalidShibLogin ) %] @@ -73,6 +82,24 @@ [% IF !TwoFA_prompt && !Koha.Preference('staffShibOnly') %] + [% SET auth_providers = AuthClient.get_providers('staff') %] + [% IF ( ! auth_providers.empty ) %] + [% FOREACH provider IN auth_providers %] +

+ + [% IF provider.icon_url %] + + [% ELSE %] + + [% END %] + Log in with [% provider.description | html %] + +

+ [% END %] +
+

If you do not have an external account, but do have a local account, you can still log in:

+ [% END # /IF auth_providers.size %] +
[% FOREACH INPUT IN INPUTS %] -- 2.37.3