Koha/cataloguing
Tomas Cohen Arazi 0db60995a8
Bug 34288: Allow access to the cataloguing module with tools permission
Bug 31162 moved the cataloguing tools to a new cataloguing module home
page. This prevents people without cataloguing permissions, but with
some tools permissions to access things like the labels creator tool.

I tracked all permissions on the cataloging-home.tt template, including
the Stock Rotation ones which I initially missed because I was focusing
on tools.

This patch makes the cataloging-home.pl page require either
'cataloguing' or any relevant 'tools' permission to allow access. the
page.

The staff interface main page and the top bar dropdown are updated using
the same logic to display the cataloguing module link.

For that purpose, I wrapped the permissions on a sub in `C4::Auth`.

To test:
1. Have a patron with only 'catalogue' and some of this permissions:

* inventory
* items_batchdel
* items_batchmod
* items_batchmod
* label_creator
* manage_staged_marc
* marc_modification_templates
* records_batchdel
* records_batchmod
* stage_marc_import
* upload_cover_images
* stockrotation => manage_rotas

2. Log in
=> FAIL: No link to the cataloguing module, neither in the dropdown
3. Apply this patch
4. Repeat 2
=> SUCCESS: You have the link!
5. Play with the different combinations and notice things are sound and
   correct
6. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-07-18 12:46:53 -03:00
..
value_builder Bug 34097: Prevent clicking ellipsis for dateaccessioned plugin from scrolling up 2023-07-14 08:59:36 -03:00
addbiblio.pl Bug 32484: Enable plugins when UseACQFrameworkForBiblioRecords is set 2023-04-21 10:36:28 -03:00
addbooks.pl Bug 29391: Improve output of reservoir search 2022-01-09 21:04:17 -10:00
additem.pl Bug 34232: Make dropdown on additem page rescept display order 2023-07-14 15:23:25 -03:00
cataloging-home.pl Bug 34288: Allow access to the cataloguing module with tools permission 2023-07-18 12:46:53 -03:00
concerns.pl Bug 31028: (follow-up) Fix permissions names 2023-03-06 11:23:17 -03:00
editor.pl Bug 33375: Quote reserved keyword 'rank' in advanced editor 2023-04-14 11:35:26 -03:00
linkitem.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
merge.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
merge_ajax.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
moveitem.pl Bug 29179: Remove useless includes in moveitem.pl 2021-10-07 10:54:59 +02:00
plugin_launcher.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ysearch.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
z3950_auth_search.pl Bug 33445: Pass through form info if present and use record values otherwise 2023-05-12 11:22:37 -03:00
z3950_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00