]> git.koha-community.org Git - koha.git/commit
Bug 36665: Add option to set the staff user's logged in branch based on their current ip
authorNick Clemens <nick@bywatersolutions.com>
Fri, 17 May 2024 11:59:21 +0000 (11:59 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 29 May 2024 14:16:14 +0000 (16:16 +0200)
commit6f4632ef04365436079a78b3b0e23bd34536d972
tree14d1ee7f002fa7b53e517a7ae7d2ec0cf3d4d6f8
parent4c4349dbdb1ce156320909d5f9527d2206a80c9e
Bug 36665: Add option to set the staff user's logged in branch based on their current ip

This patch adds a new system preference StaffLoginBranchBasedOnIP which restores the behaviour before bug 35918
of using the current IP to determine the user's logged in branchcode

To test:
 1 - Get your current ip
 2 - Set that IP for a library in the administration section
 3 - Find a user account assigned to a different library that can login to staff side
 4 - Login to staff as that user, select 'My library'
 5 - You are logged in to the user's branch
 6 - Apply patch, restart all
 7 - Log out and back in, selecting 'My library'
 8 - You are logged in to the user's branch
 9 - Enable new system preference StaffLoginBranchBasedOnIP
 9 - Log out and back in, selecting a different branch, noting the new warning below the library selection
10 - You are logged in to the branch with the matching IP
11 - Log out and back in, selecting 'My library'
10 - You are logged in to the branch with the matching IP
11 - Change your logged in branch
12 - Verify the selection sticks and you can perform staff actions in the chosen branch
13 - Change the IP of the library to one that doesn't match yours
14 - Verify you can log out and log back in and that selected branch is respected when your IP doesn't match library IP

Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a0d6f5d07b914ab03f9ae3c56b033158bd91130)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Auth.pm
installer/data/mysql/atomicupdate/bug_36665.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
t/db_dependent/Auth.t