diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql
index 7ebb5b5699..83fe8fb4f9 100644
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ b/installer/data/mysql/mandatory/sysprefs.sql
@@ -479,6 +479,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OPACDetailQRCode','0','','Enable the display of a QR Code on the OPAC detail page','YesNo'),
('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'),
+('OpacEnableLocalLogin','1','','If ON enables local login for the OPAC','YesNo'),
('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'),
('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'),
('OpacFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','free'),
@@ -738,6 +739,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('SpineLabelFormat','','30|10','This preference defines the format for the quick spine label printer. Just list the fields you would like to see in the order you would like to see them, surrounded by <>, for example .','Textarea'),
('SpineLabelShowPrintOnBibDetails','0','','If turned on, a \"Print label\" link will appear for each item on the bib details page in the staff interface.','YesNo'),
('staffClientBaseURL','',NULL,'Specify the base URL of the staff interface starting with http:// or https://. Do not include a trailing slash in the URL. (This must be filled in correctly for CAS, svc, and load_testing to work.)','free'),
+('StaffEnableLocalLogin','1','','If ON enables local login for the staff interface','YesNo'),
('StaffHighlightedWords','1','','Highlight search terms on staff interface','YesNo'),
('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'),
('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
index d463b690e1..deab211c7c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -990,6 +990,12 @@ OPAC:
- "fields (separate values with |). Tabs appear in the order listed. "
- "Currently supported values: Item types (itemtypes), Collection, (ccode) and Shelving location (loc)."
Authentication:
+ -
+ - pref: OpacEnableLocalLogin
+ choices:
+ 1: Allow
+ 0: "Don't allow"
+ - patrons to log in using local user/password.
-
- pref: OPACShibOnly
choices:
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
index c8f3f5e1e7..283fe5e6e7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
@@ -191,6 +191,12 @@ Staff interface:
0: "Don't show"
- a search field pulldown for 'Search the catalog' boxes.
Authentication:
+ -
+ - pref: StaffEnableLocalLogin
+ choices:
+ 1: Allow
+ 0: "Don't allow"
+ - staff to log in using local user/password.
-
- pref: staffShibOnly
choices:
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
index ec76759dd3..d8d94dbb99 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
@@ -120,10 +120,13 @@
[% END %]
+ [% IF Koha.Preference('StaffEnableLocalLogin') %]
If you do not have an external account, but do have a local account, you can still log in:
+ [% END %]
[% END # /IF identity_providers.size %]
+ [% IF Koha.Preference('StaffEnableLocalLogin') %]
+ [% END %]
[% IF ( casAuthentication ) %]
CAS login
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
index cda06d56eb..5ffb0629f7 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
@@ -426,9 +426,12 @@
[% END %]
+ [% IF Koha.Preference('OpacEnableLocalLogin') %]
If you do not have an external account, but do have a local account, you can still log in:
+ [% END %]
[% END # /IF identity_providers.size %]
+ [% IF Koha.Preference('OpacEnableLocalLogin') %]