View | Details | Raw Unified | Return to bug 4461
Collapse All | Expand All

(-)a/C4/Auth.pm (-1 / +2 lines)
Lines 298-304 sub get_template_and_user { Link Here
298
        my $all_perms = get_all_subpermissions();
298
        my $all_perms = get_all_subpermissions();
299
299
300
        my @flagroots = qw(circulate catalogue parameters borrowers permissions reserveforothers borrow
300
        my @flagroots = qw(circulate catalogue parameters borrowers permissions reserveforothers borrow
301
          editcatalogue updatecharges tools editauthorities serials reports acquisition clubs);
301
          editcatalogue updatecharges tools editauthorities serials reports acquisition clubs problem_reports);
302
302
303
        # We are going to use the $flags returned by checkauth
303
        # We are going to use the $flags returned by checkauth
304
        # to create the template's parameters that will indicate
304
        # to create the template's parameters that will indicate
Lines 323-328 sub get_template_and_user { Link Here
323
            $template->param( CAN_user_clubs            => 1 );
323
            $template->param( CAN_user_clubs            => 1 );
324
            $template->param( CAN_user_ill              => 1 );
324
            $template->param( CAN_user_ill              => 1 );
325
            $template->param( CAN_user_stockrotation    => 1 );
325
            $template->param( CAN_user_stockrotation    => 1 );
326
            $template->param( CAN_user_problem_reports   => 1 );
326
327
327
            foreach my $module ( keys %$all_perms ) {
328
            foreach my $module ( keys %$all_perms ) {
328
                foreach my $subperm ( keys %{ $all_perms->{$module} } ) {
329
                foreach my $subperm ( keys %{ $all_perms->{$module} } ) {
(-)a/C4/InstallAuth.pm (+1 lines)
Lines 147-152 sub get_template_and_user { Link Here
147
            $template->param( CAN_user_editauthorities  => 1 );
147
            $template->param( CAN_user_editauthorities  => 1 );
148
            $template->param( CAN_user_serials          => 1 );
148
            $template->param( CAN_user_serials          => 1 );
149
            $template->param( CAN_user_reports          => 1 );
149
            $template->param( CAN_user_reports          => 1 );
150
            $template->param( CAN_user_problem_reports   => 1 );
150
        }
151
        }
151
152
152
        my $minPasswordLength = C4::Context->preference('minPasswordLength');
153
        my $minPasswordLength = C4::Context->preference('minPasswordLength');
(-)a/installer/data/mysql/atomicupdate/bug-4461_manage_problem_reports_userflags.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES (26, 'problem_reports', 'Manage problem reports', 0) });
4
    $dbh->do(q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (26, 'manage_problem_reports', 'Manage OPAC problem reports') });
5
6
    # Always end with this (adjust the bug info)
7
    SetVersion( $DBversion );
8
    print "Upgrade to $DBversion done (Bug 4461 - Add user permissions for managing OPAC problem reports)\n";
9
}
(-)a/installer/data/mysql/userflags.sql (-1 / +2 lines)
Lines 22-26 INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES Link Here
22
(22,'ill','The Interlibrary Loans Module',0),
22
(22,'ill','The Interlibrary Loans Module',0),
23
(23,'self_check','Self check modules',0),
23
(23,'self_check','Self check modules',0),
24
(24, 'stockrotation', 'Manage stockrotation operations', 0),
24
(24, 'stockrotation', 'Manage stockrotation operations', 0),
25
(25, 'cash_management', 'Cash management', 0)
25
(25, 'cash_management', 'Cash management', 0),
26
(26, 'problem_reports', 'Manage problem reports', 0)
26
;
27
;
(-)a/installer/data/mysql/userpermissions.sql (-1 / +2 lines)
Lines 124-128 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
124
   (24, 'manage_rota_items', 'Add and remove items from rotas'),
124
   (24, 'manage_rota_items', 'Add and remove items from rotas'),
125
   (25, 'anonymous_refund', 'Perform refund actions from cash registers'),
125
   (25, 'anonymous_refund', 'Perform refund actions from cash registers'),
126
   (25, 'cashup', 'Perform cash register cashup action'),
126
   (25, 'cashup', 'Perform cash register cashup action'),
127
   (25, 'takepayment', 'Access the point of sale page and take payments')
127
   (25, 'takepayment', 'Access the point of sale page and take payments'),
128
   (26, 'manage_problem_reports', 'Manage OPAC problem reports')
128
;
129
;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 / +9 lines)
Lines 72-77 Link Here
72
    [%- CASE 'cash_management' -%]
72
    [%- CASE 'cash_management' -%]
73
        <span class="main_permission cash_management_permission">Cash management</span>
73
        <span class="main_permission cash_management_permission">Cash management</span>
74
        <span class="permissioncode">([% name | html %])</span>
74
        <span class="permissioncode">([% name | html %])</span>
75
    [%- CASE 'problem_reports' -%]
76
        <span class="main_permission problem_reports_permission">OPAC problem reports management</span>
77
        <span class="permissioncode">([% name | html %])</span>
75
    [%- END -%]
78
    [%- END -%]
76
[%- END -%]
79
[%- END -%]
77
80
Lines 709-713 Link Here
709
            Perform anonymous refund actions
712
            Perform anonymous refund actions
710
        </span>
713
        </span>
711
        <span class="permissioncode">([% name | html %])</span>
714
        <span class="permissioncode">([% name | html %])</span>
715
  [%# problem_reports %]
716
    [%- CASE 'manage_problem_reports' -%]
717
        <span class="sub_permission manage_problem_reports_subpermission">
718
            Manage OPAC problem reports
719
        </span>
720
        <span class="permissioncode">([% name | html %])</span>
712
  [%- END -%]
721
  [%- END -%]
713
[%- END -%]
722
[%- END -%]
714
- 

Return to bug 4461