Bugzilla – Attachment 148437 Details for
Bug 33260
Show message queue on staff interface and make notices printable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33260: Add view_generated_notices user permission
Bug-33260-Add-viewgeneratednotices-user-permission.patch (text/plain), 3.81 KB, created by
Aleisha Amohia
on 2023-03-21 03:27:07 UTC
(
hide
)
Description:
Bug 33260: Add view_generated_notices user permission
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-03-21 03:27:07 UTC
Size:
3.81 KB
patch
obsolete
>From 169498545b58891e212150c44497adfdcc110e97 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 20 Mar 2023 22:51:55 +0000 >Subject: [PATCH] Bug 33260: Add view_generated_notices user permission > >--- > ..._add_tools_view_generated_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_33260_-_add_tools_view_generated_notices_permission.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33260_-_add_tools_view_generated_notices_permission.pl b/installer/data/mysql/atomicupdate/bug_33260_-_add_tools_view_generated_notices_permission.pl >new file mode 100644 >index 00000000000..c6c9f8f6b63 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33260_-_add_tools_view_generated_notices_permission.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33260", >+ description => "Show message queue on staff interface and make notices printable", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (13, 'view_generated_notices', 'View and print generated notices') }); >+ >+ say $out "Added user permission view_generated_notices"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 7b6955de442..49050ba0902 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, 'view_generated_notices', 'View and print generated notices'), > (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..87cb2af30ce 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 'view_generated_notices' -%] >+ <span class="sub_permission view_generated_notices_subpermission"> >+ View and print generated notices >+ </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..eac231509b4 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_view_generated_notices' => 1, > 'CAN_user_tools_edit_patrons' => 1, > 'CAN_user_tools_edit_quotes' => 1, > 'CAN_user_tools_export_catalog' => 1, >-- >2.20.1
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 33260
:
148437
|
148438
|
148439
|
148440
|
148943
|
149009
|
149413
|
149581
|
149593
|
149594
|
149595
|
149596
|
149597
|
149598
|
150346
|
150347
|
154927
|
154928
|
157383
|
157384
|
157385
|
157386
|
158852
|
158853
|
158854
|
158855
|
162570
|
162571
|
162572
|
162573
|
162574
|
162624
|
162625
|
162677
|
162678
|
162679
|
162680
|
162681
|
164783
|
164784
|
164785
|
164786
|
164787
|
165238
|
165239
|
165717
|
165939
|
165946
|
165947
|
165948
|
165949
|
165950
|
165951
|
166020
|
166178
|
166335
|
166336
|
166337
|
166338
|
166339
|
166340
|
166341
|
166342
|
166343
|
166344
|
166345
|
166362
|
166363
|
166364
|
166365
|
166366
|
166367
|
166368
|
166369
|
166370
|
166371
|
166372
|
166373