Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc
authorBrendan Lawlor <blawlor@clamsnet.org>
Thu, 4 Apr 2024 16:35:58 +0000 (16:35 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 18 Apr 2024 06:04:54 +0000 (08:04 +0200)
commitb2ab2e27458cc01dab9dfc31522e12be0497bc52
treec384a60aaf10ebeac842340f0f4a53bbc39b760e
parentc13b941429d25a16c268c90f05b1b4c17fa0bcde
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc

This patch removes the message button and more links from the members toolbar if the user does not have CAN_user_borrowers_edit_borrowers

To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice the 'Add message' and 'More' buttons in the toolbar only link to permissions errors
3. Apply patch, restart all, reload the page
4. Notice the buttons in the toolbar are gone

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 962290a27df7f46a3ed48537fc0639f4711aecfc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc