Bug 34188: Require Library Branch Selection when Logging in
authorSam Lau <samalau@gmail.com>
Thu, 6 Jul 2023 19:59:50 +0000 (19:59 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 20:41:39 +0000 (17:41 -0300)
commit9603f118837bb8171081da6f892761f2d341726f
tree7e1ae431d71aac34a8fdab802c92e2832f27ba0d
parentf4001d5462a3490d04e65b3cf7a45174b9eb4b86
Bug 34188: Require Library Branch Selection when Logging in

This patch adds the ability to force staff to select a library when
logging into the staff interface. This is done via a new system
preference: 'ForcedLibrarySelection'

To test:
1) Apply patch, restart_all, and updatedatabase
2) Log out of the staff interface. Notice the login form looks the same
   and the "Library:" dropdown has 'My Library" selected as default. Log
   back into the staff interface.
3) In Administration, search for the system preference
   "ForcedLibrarySelection". Set it to 'Force' and press save.
4) Log out of the staff interface. Notice that this time, the "Library:"
   dropdown is required and has a blank selection as the default.
5) Fill in the username and password but do not select a library. Click
   'Log in'
6) Notice you cannot log in and are asked to 'Please select an item in
   the list'
7) Select a library from the drop down and click 'Log in'
8) Notice the login was successful and you were logged in to the library
   you selected.
9) Try loggin in with some other libraries to verify it works as
   expected
10) Sign-off :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_34188.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt