From 7a53cb8e06dc52b2164e9d1d351ad4385dc74efb Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 30 Oct 2024 11:46:05 +0000 Subject: [PATCH] Bug 38297: Add a permissions check to the New vendor button Test plan: 1) Choose a staff patron and make sure they have permissions to log into the staff interface 2) Ensure that the patron does not have the vendors_manage permission but give them one other acquisitions permission so that they can see the link on the homepage (e.g. budget_manage) 3) In an incognito browser, log in with that patron and go to the acquisitions homepage 4) The New vendor button will be visible 5) Click on it and fill in the required fields. Submit the form and it will error for lack of permissions 6) Apply patch 7) Return to the acquisitions page and the New vendor button should no longer be visible 8) Back in your main browser, give the patron the vendors_manage permission and then refresh the incognito window - the button should be visible --- .../intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc index d6b6ff9f98b..cba26b92581 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc @@ -29,7 +29,7 @@ [% IF CAN_user_acquisition_order_receive && basketcount && active %]
Receive shipments
[% END %] - [% ELSE %] + [% ELSIF ( CAN_user_acquisition_vendors_manage ) %]
New vendor
[% END %] -- 2.39.3 (Apple Git-146)