]> git.koha-community.org Git - koha.git/commit
Bug 36941: Limit login branch list when IP restriction enabled
authorNick Clemens <nick@bywatersolutions.com>
Thu, 23 May 2024 12:30:46 +0000 (12:30 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 28 Jun 2024 11:49:26 +0000 (13:49 +0200)
commit492645a9d2a193672072a69a097d7f837dd0c718
tree89684210528c514336aa00491855515a1346deae
parentb6fe3a50912a3ec57a68573b73563539a332973d
Bug 36941: Limit login branch list when IP restriction enabled

This patch adds a new 'ip_limit' option to Koha::Template:Plugin::Branches

To test:
1 - Set some branches in the system to have random IPs
2 - Set one branch to have your IP
    To find the IP in KTD I:
    Enabled ILS-DI
    Set ILS-DI:AuthorizedIPs to 1.1.1.1
    Visit:
    http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=248&id_type=biblio
    And note the unauthorized IP listed
3 - Log out, confirm all branches are listed
4 - Log in, enable StaffLoginRestrictLibraryByIP
5 - Log out, confirm branches with IPs are removed
6 - Confirm branch matching your IP is listed
7 - Choose any of the branches and login
8 - Confirm login works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Template/Plugin/Branches.pm
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
t/db_dependent/Koha/Template/Plugin/Branches.t [new file with mode: 0755]