From 66fdd41bdbdb636b36355eb21bc8afa4d1c9c1f4 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 Signed-off-by: Lukasz Koszyk Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../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 8f8affb01f..164ed907fb 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' %] @@ -15,7 +16,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' %] [% PROCESS 'auth-two-factor.inc' %] @@ -65,6 +67,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 ) %] @@ -75,6 +84,24 @@ [% IF !TwoFA_prompt && !TwoFA_setup && !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.39.5