Bugzilla – Attachment 102372 Details for
Bug 4461
Add a context-sensitive report a problem process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4461: Adding user flags for managing OPAC problem reports
Bug-4461-Adding-user-flags-for-managing-OPAC-probl.patch (text/plain), 5.91 KB, created by
Jonathan Druart
on 2020-04-03 13:11:02 UTC
(
hide
)
Description:
Bug 4461: Adding user flags for managing OPAC problem reports
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-03 13:11:02 UTC
Size:
5.91 KB
patch
obsolete
>From c19afb1708cc30f07c1274953400994b5efd67c6 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 10 Mar 2020 22:27:56 +0000 >Subject: [PATCH] Bug 4461: Adding user flags for managing OPAC problem reports > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Auth.pm | 3 ++- > C4/InstallAuth.pm | 1 + > .../bug-4461_manage_problem_reports_userflags.perl | 9 +++++++++ > installer/data/mysql/userflags.sql | 3 ++- > installer/data/mysql/userpermissions.sql | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 9 +++++++++ > 6 files changed, 25 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-4461_manage_problem_reports_userflags.perl > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index dc83ac4ea0..067c576950 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -298,7 +298,7 @@ sub get_template_and_user { > my $all_perms = get_all_subpermissions(); > > my @flagroots = qw(circulate catalogue parameters borrowers permissions reserveforothers borrow >- editcatalogue updatecharges tools editauthorities serials reports acquisition clubs); >+ editcatalogue updatecharges tools editauthorities serials reports acquisition clubs problem_reports); > > # We are going to use the $flags returned by checkauth > # to create the template's parameters that will indicate >@@ -323,6 +323,7 @@ sub get_template_and_user { > $template->param( CAN_user_clubs => 1 ); > $template->param( CAN_user_ill => 1 ); > $template->param( CAN_user_stockrotation => 1 ); >+ $template->param( CAN_user_problem_reports => 1 ); > > foreach my $module ( keys %$all_perms ) { > foreach my $subperm ( keys %{ $all_perms->{$module} } ) { >diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm >index b73794ae99..987045df50 100644 >--- a/C4/InstallAuth.pm >+++ b/C4/InstallAuth.pm >@@ -147,6 +147,7 @@ sub get_template_and_user { > $template->param( CAN_user_editauthorities => 1 ); > $template->param( CAN_user_serials => 1 ); > $template->param( CAN_user_reports => 1 ); >+ $template->param( CAN_user_problem_reports => 1 ); > } > > my $minPasswordLength = C4::Context->preference('minPasswordLength'); >diff --git a/installer/data/mysql/atomicupdate/bug-4461_manage_problem_reports_userflags.perl b/installer/data/mysql/atomicupdate/bug-4461_manage_problem_reports_userflags.perl >new file mode 100644 >index 0000000000..0d12b9888d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-4461_manage_problem_reports_userflags.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES (26, 'problem_reports', 'Manage problem reports', 0) }); >+ $dbh->do(q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (26, 'manage_problem_reports', 'Manage OPAC problem reports') }); >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 4461 - Add user permissions for managing OPAC problem reports)\n"; >+} >diff --git a/installer/data/mysql/userflags.sql b/installer/data/mysql/userflags.sql >index ecadc0d450..40ec125eea 100644 >--- a/installer/data/mysql/userflags.sql >+++ b/installer/data/mysql/userflags.sql >@@ -22,5 +22,6 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES > (22,'ill','The Interlibrary Loans Module',0), > (23,'self_check','Self check modules',0), > (24, 'stockrotation', 'Manage stockrotation operations', 0), >-(25, 'cash_management', 'Cash management', 0) >+(25, 'cash_management', 'Cash management', 0), >+(26, 'problem_reports', 'Manage problem reports', 0) > ; >diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql >index a0a4958494..a79e48c6ff 100644 >--- a/installer/data/mysql/userpermissions.sql >+++ b/installer/data/mysql/userpermissions.sql >@@ -125,5 +125,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (24, 'manage_rota_items', 'Add and remove items from rotas'), > (25, 'anonymous_refund', 'Perform refund actions from cash registers'), > (25, 'cashup', 'Perform cash register cashup action'), >- (25, 'takepayment', 'Access the point of sale page and take payments') >+ (25, 'takepayment', 'Access the point of sale page and take payments'), >+ (26, 'manage_problem_reports', 'Manage OPAC problem reports') > ; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index 280054ddf5..1179537930 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -72,6 +72,9 @@ > [%- CASE 'cash_management' -%] > <span class="main_permission cash_management_permission">Cash management</span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'problem_reports' -%] >+ <span class="main_permission problem_reports_permission">OPAC problem reports management</span> >+ <span class="permissioncode">([% name | html %])</span> > [%- END -%] > [%- END -%] > >@@ -719,5 +722,11 @@ > Perform anonymous refund actions > </span> > <span class="permissioncode">([% name | html %])</span> >+ [%# problem_reports %] >+ [%- CASE 'manage_problem_reports' -%] >+ <span class="sub_permission manage_problem_reports_subpermission"> >+ Manage OPAC problem reports >+ </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- END -%] > [%- END -%] >-- >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 4461
:
58887
|
59032
|
61654
|
65871
|
66253
|
66323
|
66324
|
98687
|
98688
|
98689
|
98725
|
99551
|
99599
|
99600
|
99601
|
99602
|
99603
|
99633
|
99635
|
99636
|
99637
|
99638
|
99639
|
99929
|
99930
|
99931
|
99932
|
99933
|
99934
|
99935
|
99936
|
99937
|
99938
|
99939
|
99940
|
99941
|
99942
|
100488
|
100489
|
100490
|
100491
|
100492
|
100493
|
100494
|
100495
|
100496
|
100497
|
100498
|
100499
|
100500
|
100506
|
100507
|
100508
|
100509
|
100510
|
100511
|
100512
|
100513
|
100514
|
100515
|
100516
|
100517
|
100518
|
100519
|
100520
|
100521
|
100522
|
100523
|
100524
|
100619
|
100989
|
100990
|
102188
|
102189
|
102190
|
102191
|
102192
|
102193
|
102194
|
102195
|
102196
|
102198
|
102200
|
102201
|
102202
|
102203
|
102204
|
102205
|
102206
|
102207
|
102208
|
102209
|
102210
|
102211
|
102253
|
102279
|
102281
|
102308
|
102309
|
102310
|
102311
|
102312
|
102313
|
102314
|
102315
|
102316
|
102317
|
102318
|
102319
|
102320
|
102321
|
102322
|
102323
|
102324
|
102325
|
102326
|
102327
|
102328
|
102329
|
102330
|
102331
|
102358
|
102359
|
102360
|
102361
|
102362
|
102363
|
102364
|
102365
|
102366
|
102367
|
102368
|
102369
|
102370
|
102371
| 102372 |
102373
|
102374
|
102375
|
102376
|
102377
|
102378
|
102379
|
102380
|
102381
|
102382
|
102383
|
102384
|
102385
|
102386