Bug 26628: Fix access to clubs when user only has clubs permission
authorKatrin Fischer <katrin.fischer.83@web.de>
Thu, 26 Jan 2023 21:46:51 +0000 (21:46 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 3 Feb 2023 22:11:05 +0000 (22:11 +0000)
commite1df60db477e396a903bccde01f9abfad7cd717e
tree01719cbe9f6989bb3102d63f0e7e44d9091d620d
parent06d09180e678d511b79ee491bc78b763625a3ca4
Bug 26628: Fix access to clubs when user only has clubs permission

If a user only has the clubs and no permission from the tools section,
they can't access the patron clubs page by navigation. This patch
extends the permission checks for tools to include the clubs, that
live on the tools page, but have a top level permission.

To test:
- create a patron with only the catalogue and clubs permissions
- log in to the staff client as that patron
- navigate to a patron record, confirm you can see the Clubs tab in the patron account, can add patrons to and remove patrons from clubs
- confirm you don't have a link to the Tools module either on the Koha homepage or in the More menu
- enter the clubs URL manually (/cgi-bin/koha/clubs/clubs.pl), confirm you are allowed to open the page
- Apply patch
- The only changes should be:
  - You can now see the Tools entry in the More navigation menu
  - You can now see the Tools module link on the start page
  - Both take you to the tools page, only visible tools is 'Patron clubs'

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50927bb9b530f7a9c092dfe99bd2dddc69202432)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ecdd1d2b420f646279c69f61be30e46a33e8739e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
tools/tools-home.pl