Koha/koha-tmpl/intranet-tmpl/prog/en/includes
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
..
background_jobs Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
catalogue Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
csv_headers
mana Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
modals
str
virtualshelves/merge
about-team.inc
accounts.inc Bug 26403: (QA follow-up) Add missing debit and credit types to includes 2023-05-10 15:26:15 -03:00
acquisitions-add-to-basket.inc Bug 34002: Check for stage_marc_import permssion 2023-07-06 12:24:16 -03:00
acquisitions-menu.inc Bug 33663: Don't hide Suggestions link in side navigation when suggestion preference is disabled 2023-05-23 16:53:57 -03:00
acquisitions-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
acquisitions-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
additional-fields-display.inc
additional-fields-entry.inc Bug 11844: (follow-up) Fix terminology: biblio should be bibliographic record 2023-05-16 12:58:38 +02:00
admin-icon-selection.inc Bug 33158: (follow-up) Fix for QA test failure 2023-05-16 15:17:31 -03:00
admin-items-search-field-form.inc
admin-menu.inc Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers' 2023-06-05 14:36:03 -03:00
adv-search.inc Bug 32910: Adjust fontawesome icons ref 2023-06-12 11:52:08 -03:00
auth-finder-search.inc Bug 31132: (follow-up) Reset dropdown values and style button 2023-06-23 11:00:59 -03:00
auth-two-factor.inc Bug 34028: Fix manual entry for two factor authentication 2023-06-21 13:20:31 -03:00
authorities-search-results.inc
authorities-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
authorities-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
authorities.inc
authorities_js.inc Bug 34180: Template variable in JavaScript prevents authority MARC preview from displaying 2023-07-03 14:51:45 -03:00
authority-detail-modal.inc
av-build-dropbox.inc
biblio-title-head.inc
biblio-title.inc Bug 33946: (QA follow-up) Add spans and classes for styling and translatability 2023-07-14 08:59:30 -03:00
biblio-view-menu.inc
blocked-fines.inc
blocking_errors.inc
branch-selector.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
budget_planning.inc
budgets-active-currency.inc
budgets-admin-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
budgets-admin-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
calendar.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
cat-menu.inc
cat-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
cat-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
catalog-strings.inc
cataloging-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
catalogue-search-box.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
cateditor-ui.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
cateditor-widgets-marc21.inc
category-out-of-age-limit.inc
chart.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
checkin-search-box.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
checkin-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
checkouts-table-footer.inc
checkouts-table.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
circ-menu.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
circ-nav.inc Bug 30624: Add loggedinlibrary permission and DB update 2023-03-13 15:22:59 -03:00
circ-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
cities-admin-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
clubs-table.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
columns_settings.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
contracts-admin-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
country-list.inc
currencies-admin-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
datatables.inc Bug 8179: (follow-up) Fix currency change and remove datatables select 2023-05-15 08:53:52 -03:00
date-format.inc
delimiter_text.inc
desks-admin-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
doc-head-close-receipt.inc
doc-head-close.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
doc-head-open.inc
empty_line.inc
erm-search.inc Bug 32910: (follow-up) A few more icon name corrections 2023-06-12 11:52:11 -03:00
facets.inc
filter-orders.inc
form-blocks.inc
format_price.inc
greybox.inc
guided-reports-view.inc
header.inc Bug 34288: Allow access to the cataloguing module with tools permission 2023-07-18 12:46:53 -03:00
holds_table.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
home-search.inc Bug 32910: Adjust fontawesome icons ref 2023-06-12 11:52:08 -03:00
html_helpers.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
i18n.inc
ill-availability-table.inc
ill-list-table-strings.inc Bug 22440: New ILL requests table 2023-05-05 09:13:41 -03:00
ill-list-table.inc Bug 33786: ILL requests table id 2023-06-06 09:58:52 -03:00
ill-toolbar.inc
installer-doc-head-close.inc Bug 33998: Installer and onboarding have incorrect Font Awesome asset links 2023-06-14 09:22:01 -03:00
installer-intranet-bottom.inc
installer-strings.inc
intranet-bottom.inc
intranetstylesheet.inc
job_progress.inc
js-biblio-format.inc Bug 33873: Improve check for inexistant biblio object 2023-06-06 09:58:53 -03:00
js-date-format.inc Bug 33804: (follow-up) Convert to JSDoc formatted documentation 2023-07-14 08:59:41 -03:00
js-patron-format-address.inc Bug 26967: Correctly format patron address in autocomplete 2023-04-21 10:36:26 -03:00
js-patron-format.inc Bug 33504: Update patron_to_html to deal with null 2023-05-05 09:13:20 -03:00
js-patron-get-age.inc
js_includes.inc Bug 34092: Move search-patron.inc logic into buildPatronSearchQuery 2023-07-03 14:51:39 -03:00
keyboard_shortcuts.inc
labels-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
langmenu-staff-top.inc
last-borrower.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
letters-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
member-alt-address-style.inc
member-alt-contact-style.inc
member-display-address-style.inc
member-display-alt-address-style.inc
member-main-address-style.inc
member-search-box.inc Bug 34094: Use DefaultPatronSearchMethod consistently 2023-07-03 14:51:37 -03:00
members-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
merge-record.inc Bug 33181: Use template wrapper for tabs on record merge pages 2023-04-14 15:39:40 -03:00
messaging-preference-form.inc
modal-claims.inc Bug 33613: Use prop() to evaluate checkbox 2023-05-09 10:58:05 -03:00
noadd-warnings.inc
onboarding_messages.inc
page-numbers.inc
password_check.inc
patron-age.inc
patron-article-requests.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
patron-detail-tabs.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
patron-restrictions-tab.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
patron-return-claims.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
patron-search-box.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
patron-search-header.inc Bug 32910: Adjust fontawesome icons ref 2023-06-12 11:52:08 -03:00
patron-search.inc Bug 34233: Move select2 include out of patron-search.inc 2023-07-11 08:52:31 -03:00
patron-title.inc Bug 33266: Fix missing space in patron title 2023-03-20 09:39:52 -03:00
patron-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
patron_messages.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
patroncards-errors.inc
patroncards-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
patronfields.inc
patrons-admin-search.inc Bug 32910: Adjust fontawesome icons ref 2023-06-12 11:52:08 -03:00
permissions.inc Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers' 2023-06-05 14:36:03 -03:00
popup-bottom.inc
pos-menu.inc
prefs-admin-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
prefs-menu.inc Bug 33634: Correct anchors in system preference submenu 2023-05-05 09:13:26 -03:00
recalls.inc Bug 34010: Template corrections to recall pages 2023-06-23 09:46:41 -03:00
relatives-issues-table.inc Bug 33528: Use template wrapper for tabs: Patron details page 2023-06-14 09:22:02 -03:00
renew-search-box.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
renew_results.inc
renew_strings.inc Bug 31735: Avoid re-fetcing objects from database by passing them directly instead of ids to various subroutines 2023-05-12 12:40:21 -03:00
reports-menu.inc
reports-toolbar.inc Bug 33808: Add aria-labels in reports-toolbar.inc 2023-07-14 15:23:22 -03:00
resort_form.inc
restriction-types.inc Bug 33551: (QA follow-up) Fix TT filters 2023-05-05 10:18:41 -03:00
rotating-collections-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
search_indexes.inc Bug 31841: Use location,wrdl when searching Shelving location 2023-04-06 09:47:22 -03:00
select2.inc
serial-status.inc Bug 32752: Add new status Circulating, Out for binding, and Bound to includes 2023-05-15 18:24:08 -03:00
serials-advsearch.inc Bug 32771: Standardize structure around action fieldsets in serials 2023-03-31 12:30:37 +02:00
serials-menu.inc
serials-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
serials-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
shortcut.inc Bug 32910: Adjust fontawesome icons ref 2023-06-12 11:52:08 -03:00
slip-print.inc
stockrotation-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
sub-header.inc
subscriptions-search.inc Bug 32771: Standardize structure around action fieldsets in serials 2023-03-31 12:30:37 +02:00
subtype_limits.inc
subtypes_unimarc.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
suggestions-add-search.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
tools-item-action.inc
tools-menu.inc
tools-nomatch-action.inc
tools-overlay-action.inc
transaction_types.inc
transfer_reasons.inc
validator-strings.inc
vendor-menu.inc
virtualshelves-toolbar.inc Bug 34112: Replace fa.fa-pencil-alt with fa-solid.fa-pencil in edit buttons 2023-07-11 08:52:31 -03:00
waiting_holds.inc Bug 32910: (follow-up) Replace v4 icon names with v6 2023-06-12 11:52:10 -03:00
wysiwyg-systempreferences.inc
xslt-handler.inc
z3950-admin-search.inc Bug 32683: Convert header search tabs to Bootstrap 2023-03-10 12:04:08 -03:00
z3950_search.inc