]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 31 May 2024 14:35:07 +0000 (14:35 +0000)
commit176763cfa7e47cddbafa929525c235bd5b26a249
tree273fffa9dda2eb2a54d1313d2a8b12609c1f15dd
parent1a42d81247bc0bde9542b2bd2574a6a863c23a62
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>
(cherry picked from commit 6f4632ef04365436079a78b3b0e23bd34536d972)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.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