[Koha-bugs] [Bug 34288] Cannot use cataloguing tools without cataloguing permissions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 17 17:15:39 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34288

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #153527|0                           |1
        is obsolete|                            |

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 153560
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153560&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list