Bugzilla – Attachment 150001 Details for
Bug 33478
Customise the format of notices when they are printed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33478: Add format_notices user permission
Bug-33478-Add-formatnotices-user-permission.patch (text/plain), 3.76 KB, created by
Aleisha Amohia
on 2023-04-21 03:39:58 UTC
(
hide
)
Description:
Bug 33478: Add format_notices user permission
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-04-21 03:39:58 UTC
Size:
3.76 KB
patch
obsolete
>From 125ca55937c5bdaf05b012f10694a6162b0a3666 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 19 Apr 2023 21:26:17 +0000 >Subject: [PATCH] Bug 33478: Add format_notices user permission > >--- > .../bug_33478_-_add_format_notices_permission.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/userpermissions.sql | 1 + > .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ > t/Koha/Auth/Permissions.t | 1 + > 4 files changed, 21 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_33478_-_add_format_notices_permission.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33478_-_add_format_notices_permission.pl b/installer/data/mysql/atomicupdate/bug_33478_-_add_format_notices_permission.pl >new file mode 100644 >index 00000000000..d358c25f350 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33478_-_add_format_notices_permission.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33478", >+ description => "Customise the format of notices when they are printed", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (13, 'format_notices', 'Format how generated notices are laid out when printed') }); >+ >+ say $out "Added user permission format_notices"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 7b6955de442..81545960397 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -90,6 +90,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'moderate_comments', 'Moderate patron comments'), > (13, 'edit_notices', 'Define notices'), > (13, 'edit_notice_status_triggers', 'Set notice/status triggers for overdue items'), >+ (13, 'format_notices', 'Format how generated notices are laid out when printed'), > (13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'), > (13, 'view_system_logs', 'Browse the system logs'), > (13, 'inventory', 'Perform inventory (stocktaking) of your catalog'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index e4c4cbe2a64..62f0102f02e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -514,6 +514,11 @@ > Define notices > </span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'format_notices' -%] >+ <span class="sub_permission format_notices_subpermission"> >+ Format how generated notices are laid out when printed >+ </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'edit_patrons' -%] > <span class="sub_permission edit_patrons_subpermission"> > Perform batch modification of patrons >diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t >index d5d2b98d1c6..b4ae5a3a859 100755 >--- a/t/Koha/Auth/Permissions.t >+++ b/t/Koha/Auth/Permissions.t >@@ -245,6 +245,7 @@ subtest 'superlibrarian tests' => sub { > 'CAN_user_tools_edit_calendar' => 1, > 'CAN_user_tools_edit_notice_status_triggers' => 1, > 'CAN_user_tools_edit_notices' => 1, >+ 'CAN_user_tools_format_notices' => 1, > 'CAN_user_tools_edit_patrons' => 1, > 'CAN_user_tools_edit_quotes' => 1, > 'CAN_user_tools_export_catalog' => 1, >-- >2.30.2
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 33478
:
149743
|
149785
|
149786
|
149787
|
149914
|
149915
|
149916
|
149917
|
149918
|
149999
|
150000
|
150001
|
150002
|
150003
|
150004
|
150005
|
150006
|
150007
|
150008
|
150009
|
150010
|
150011
|
150012
|
150265
|
150266
|
150267
|
150268
|
150269
|
150270
|
150271
|
150272
|
150273
|
150274
|
150275
|
150276
|
150277
|
150324
|
150325
|
150326
|
150327
|
150328
|
150329
|
150330
|
150331
|
150332
|
150333
|
150334
|
150335
|
150336
|
150337
|
150338
|
150339
|
150340
|
150341
|
150342
|
150343
|
150344
|
150345
|
151548
|
151580
|
151581
|
151582
|
151583
|
151584
|
151585
|
151586
|
151587
|
151588
|
151589
|
151590
|
151591
|
151592
|
151593
|
156469
|
157368
|
157369
|
157370
|
157371
|
157372
|
157373
|
157374
|
157375
|
157376
|
157377
|
157378
|
157379
|
157380
|
157381
|
157382
|
157387
|
158835
|
158836
|
158837
|
158838
|
158839
|
158840
|
158841
|
158842
|
158843
|
158844
|
158845
|
158846
|
158847
|
158848
|
158849
|
158856
|
162556
|
162557
|
162558
|
162559
|
162560
|
162561
|
162562
|
162563
|
162564
|
162565
|
162566
|
162567
|
162568
|
162569
|
163903
|
163904
|
163905
|
163906
|
163907
|
163908
|
163909
|
163910
|
163911
|
163912
|
163913
|
163914
|
163915
|
163916
|
163924
|
163925
|
163926
|
163927
|
163928
|
163929
|
163930
|
163931
|
163932
|
163933
|
163934
|
163935
|
163936
|
163937
|
163938
|
164719
|
164720
|
164721
|
164722
|
164723
|
164724
|
164725
|
164726
|
164727
|
164728
|
164729
|
164730
|
164731
|
164732
|
164733
|
164741
|
164742
|
164743
|
164744
|
164745
|
164746
|
164747
|
164748
|
164749
|
164750
|
164751
|
164752
|
164753
|
164754
|
164755