Bug 35941: Limit club list to those from the logged in user
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 30 Jan 2024 13:53:03 +0000 (14:53 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 11 Mar 2024 14:54:57 +0000 (14:54 +0000)
commit74e358518bf08fb37a56f02ae850dc8e1412e22e
tree1c1b178832cd2a4cd9c8038ac7d56442d739462d
parent78f7aa74cf8c2c5362cfafc2267c4968e7e78d03
Bug 35941: Limit club list to those from the logged in user

clubs-tab get the patron's id from the parameter. At the OPAC we must
use the one from the logged in user, to prevent leak to other users

Test plan:
Have 2 clubs: A, B
Enroll to A with patron borrowernumber=1
Enroll to B with patron borrowernumber=2
Log in with patron 1 and hit:
  http://localhost:8080/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=1
=> OK
Now hit
  http://localhost:8080/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=2
=> oops

Apply this patch, try again.
The "borrowernumber" parameter is no longer used to fetch the club list.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e51ef7ef76a4ee523b302d724d80118185030e60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit afcb9d027765be35cc476f7e48b514c576a8cea1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/enroll.tt
opac/clubs/clubs-tab.pl
opac/clubs/enroll.pl