From ab16d3d475163215c80a141672245071a256fd26 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 30 Oct 2024 11:35:54 +0000 Subject: [PATCH] Bug 34355: (QA follow-up) Permissions fixes This patch addresses some permissions errors and updates the breadcrumbs to reflect this --- Koha/ImportBatch.pm | 2 +- api/v1/swagger/paths/acquisitions_vendors.yaml | 4 +++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 2 +- .../prog/en/modules/admin/marc_order_accounts.tt | 6 +++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Koha/ImportBatch.pm b/Koha/ImportBatch.pm index 994ff8b564f..3f63df6e564 100644 --- a/Koha/ImportBatch.pm +++ b/Koha/ImportBatch.pm @@ -121,7 +121,7 @@ sub new_from_file { if ( $num_valid && $job ) { $job->set( { progress => $num_valid, size => $num_valid } ); } else { # We must assume that something went wrong here - $job->set( { progress => 0, status => 'failed' } ); + $job->set( { progress => 0, status => 'failed' } ) if $job; } if ($profile_id) { diff --git a/api/v1/swagger/paths/acquisitions_vendors.yaml b/api/v1/swagger/paths/acquisitions_vendors.yaml index ed817cc2a1d..854e29e19b7 100644 --- a/api/v1/swagger/paths/acquisitions_vendors.yaml +++ b/api/v1/swagger/paths/acquisitions_vendors.yaml @@ -75,7 +75,9 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - acquisition: vendors_manage + acquisition: + - vendors_manage + - marc_order_manage post: x-mojo-to: Acquisitions::Vendors#add operationId: addVendor diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index 8d40379e76f..1f7c3b0de20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -225,7 +225,7 @@ [% END %] - [% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || ( Koha.Preference('EDIFACT') && CAN_user_acquisition_edi_manage ) ) %] + [% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || ( Koha.Preference('EDIFACT') && CAN_user_acquisition_edi_manage ) || ( Koha.Preference('MarcOrderingAutomation') && CAN_user_acquisition_marc_order_manage ) ) %]

Acquisition parameters

[% IF ( CAN_user_acquisition_currencies_manage ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt index 2a9b8675779..b9c9dc5fd8f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt @@ -17,7 +17,11 @@ MARC Order Accounts [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item %] - Administration + [% IF CAN_user_parameters %] + Administration + [% ELSE %] + Acquisitions + [% END %] [% END %] [% IF acct_form || delete_confirm %] -- 2.39.3 (Apple Git-146)