Bugzilla – Attachment 173062 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: (QA follow-up) Add permission marc_order_manage to govern control of account creation
Bug-34355-QA-follow-up-Add-permission-marcorderman.patch (text/plain), 8.46 KB, created by
Matt Blenkinsop
on 2024-10-21 14:40:26 UTC
(
hide
)
Description:
Bug 34355: (QA follow-up) Add permission marc_order_manage to govern control of account creation
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-10-21 14:40:26 UTC
Size:
8.46 KB
patch
obsolete
>From b13db49d4f0195820882e93f2ca0646b322684d9 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 21 Oct 2024 09:51:42 +0000 >Subject: [PATCH] Bug 34355: (QA follow-up) Add permission marc_order_manage to > govern control of account creation > >--- > admin/marc_order_accounts.pl | 1 + > .../atomicupdate/bug_34355-add_marc_order_accounts.pl | 8 ++++++++ > installer/data/mysql/mandatory/userpermissions.sql | 1 + > .../intranet-tmpl/prog/en/includes/acquisitions-menu.inc | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ > .../intranet-tmpl/prog/en/modules/admin/admin-home.tt | 2 +- > t/Koha/Auth/Permissions.t | 1 + > 8 files changed, 22 insertions(+), 6 deletions(-) > >diff --git a/admin/marc_order_accounts.pl b/admin/marc_order_accounts.pl >index acd969e997c..ce5899900bf 100755 >--- a/admin/marc_order_accounts.pl >+++ b/admin/marc_order_accounts.pl >@@ -44,6 +44,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > template_name => "admin/marc_order_accounts.tt", > query => $input, > type => "intranet", >+ flagsrequired => { acquisition => 'marc_order_manage' }, > } > ); > >diff --git a/installer/data/mysql/atomicupdate/bug_34355-add_marc_order_accounts.pl b/installer/data/mysql/atomicupdate/bug_34355-add_marc_order_accounts.pl >index 149afbeee96..c50eae6c66d 100755 >--- a/installer/data/mysql/atomicupdate/bug_34355-add_marc_order_accounts.pl >+++ b/installer/data/mysql/atomicupdate/bug_34355-add_marc_order_accounts.pl >@@ -43,5 +43,13 @@ return { > } > ); > >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO permissions (module_bit, code, description) values (11, 'marc_order_manage', 'Manage MARC ordering'); >+ } >+ ); >+ >+ >+ > }, > }; >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 83808b97a2d..d0fda8bc033 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -86,6 +86,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (11, 'budget_add_del', 'Add and delete funds (but can''t modify funds)'), > (11, 'budget_manage_all', 'Manage all funds'), > (11, 'edi_manage', 'Manage EDIFACT transmissions'), >+ (11, 'marc_order_manage', 'Manage MARC ordering'), > (11, 'reopen_closed_invoices', 'Reopen closed invoices'), > (11, 'edit_invoices', 'Edit invoices'), > (11, 'delete_invoices', 'Delete invoices'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >index a633ff21a20..819be190c7b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >@@ -24,7 +24,7 @@ > [% END %] > </ul> > [% END %] >- [% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_currencies_manage || ( Koha.Preference('EDIFACT') && CAN_user_acquisition_edi_manage ) || CAN_user_parameters_manage_additional_fields ) %] >+ [% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_currencies_manage || ( Koha.Preference('EDIFACT') && CAN_user_acquisition_edi_manage ) || CAN_user_parameters_manage_additional_fields ) || ( Koha.Preference('MarcOrderingAutomation') && CAN_user_acquisition_marc_order_manage ) %] > <h5>Administration</h5> > <ul> > [% IF ( CAN_user_acquisition_period_manage ) %] >@@ -40,7 +40,7 @@ > <li><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></li> > <li><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></li> > [% END %] >- [% IF Koha.Preference('MarcOrderingAutomation') %] >+ [% IF Koha.Preference('MarcOrderingAutomation') && CAN_user_acquisition_marc_order_manage %] > <li><a href="/cgi-bin/koha/admin/marc_order_accounts.pl">MARC order accounts</a></li> > [% END %] > [% IF CAN_user_acquisition_edit_invoices && CAN_user_parameters_manage_additional_fields %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >index 848bd5a3b73..f86cdb02d11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc >@@ -125,7 +125,7 @@ > </ul> > [% 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 ) %] > <h5>Acquisition parameters</h5> > <ul> > [% IF ( CAN_user_acquisition_currencies_manage ) %] >@@ -141,8 +141,8 @@ > <li><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></li> > <li><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></li> > [% END %] >- [% IF Koha.Preference('MarcOrderingAutomation') %] >- <li><a href="/cgi-bin/koha/admin/marc_order_accounts.pl">MARC order accounts</a></li> >+ [% IF ( Koha.Preference('MarcOrderingAutomation') && CAN_user_acquisition_marc_order_manage ) %] >+ <li><a href="/cgi-bin/koha/admin/edi_accounts.pl">MARC ordering accounts</a></li> > [% END %] > </ul> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index f5396703e76..d4c263b98c3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -827,6 +827,11 @@ > Manage EDIFACT transmissions > </span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'marc_order_manage' -%] >+ <span class="sub_permission marc_order_manage_subpermission"> >+ Manage MARC ordering >+ </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'reopen_closed_invoices' -%] > <span class="sub_permission reopen_closed_invoices_subpermission"> > Reopen closed invoices >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 336b48cb6be..8d40379e76f 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 >@@ -246,7 +246,7 @@ > <dt><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></dt> > <dd>Manage library EDI EANs</dd> > [% END %] >- [% IF Koha.Preference('MarcOrderingAutomation') %] >+ [% IF ( Koha.Preference('MarcOrderingAutomation') && CAN_user_acquisition_marc_order_manage ) %] > <dt><a href="/cgi-bin/koha/admin/marc_order_accounts.pl">MARC order accounts</a></dt> > <dd>Manage vendor accounts for automated order line creation from marc records</dd> > [% END %] >diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t >index 426b105855a..4b398646f3b 100755 >--- a/t/Koha/Auth/Permissions.t >+++ b/t/Koha/Auth/Permissions.t >@@ -115,6 +115,7 @@ subtest 'superlibrarian tests' => sub { > 'CAN_user_acquisition_group_manage' => 1, > 'CAN_user_acquisition_issue_manage' => 1, > 'CAN_user_acquisition_merge_invoices' => 1, >+ 'CAN_user_acquisition_marc_order_manage' => 1, > 'CAN_user_acquisition_order_manage_all' => 1, > 'CAN_user_acquisition_order_manage' => 1, > 'CAN_user_acquisition_order_receive' => 1, >-- >2.39.3 (Apple Git-146)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
|
174363
|
174364
|
174365
|
174366
|
174367
|
174368
|
174369
|
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383