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

(-)a/installer/data/mysql/atomicupdate/bug_38924-patron_quotas.pl (-2 / +9 lines)
Lines 3-9 use Koha::Installer::Output qw(say_warning say_success say_info); Link Here
3
3
4
return {
4
return {
5
    bug_number  => "38924",
5
    bug_number  => "38924",
6
    description => "Add patron quota table",
6
    description => "Add patron quota table and permissions",
7
    up          => sub {
7
    up          => sub {
8
        my ($args) = @_;
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 25-31 return { Link Here
25
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
25
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
26
                }
26
                }
27
            );
27
            );
28
            say_success( $out, "Patron quota table created successfully" );
28
            
29
            $dbh->do(q{
30
                INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
31
                (4, 'manage_borrower_quotas', 'Manage patron quotas'),
32
                (4, 'view_borrower_quotas', 'View patron quotas')
33
            });
34
            
35
            say_success( $out, "Patron quota table and permissions created successfully" );
29
        } else {
36
        } else {
30
            say_info( $out, "Patron quota table already exists" );
37
            say_info( $out, "Patron quota table already exists" );
31
        }
38
        }
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+2 lines)
Lines 47-54 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
47
   ( 4, 'delete_borrowers', 'Delete patrons'),
47
   ( 4, 'delete_borrowers', 'Delete patrons'),
48
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
48
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
49
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
49
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
50
   ( 4, 'manage_borrower_quotas', 'Manage patron quotas'),
50
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
51
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
51
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
52
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
53
   ( 4, 'view_borrower_quotas', 'View patron quotas'),
52
   ( 6, 'place_holds', 'Place holds for patrons'),
54
   ( 6, 'place_holds', 'Place holds for patrons'),
53
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
55
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
54
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
56
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+6 lines)
Lines 544-549 Link Here
544
    [%- CASE 'marc_order_manage' -%]
544
    [%- CASE 'marc_order_manage' -%]
545
        <span class="sub_permission marc_order_manage_subpermission"> Manage MARC ordering </span>
545
        <span class="sub_permission marc_order_manage_subpermission"> Manage MARC ordering </span>
546
        <span class="permissioncode">([% name | html %])</span>
546
        <span class="permissioncode">([% name | html %])</span>
547
    [%- CASE 'view_borrower_quotas' -%]
548
        <span class="sub_permission view_borrower_quotas_subpermission"> View patron quotas </span>
549
        <span class="permissioncode">([% name | html %])</span>
550
    [%- CASE 'manage_borrower_quotas' -%]
551
        <span class="sub_permission manage_borrower_quotas_subpermission"> Manage patron quotas </span>
552
        <span class="permissioncode">([% name | html %])</span>
547
    [%- CASE 'reopen_closed_invoices' -%]
553
    [%- CASE 'reopen_closed_invoices' -%]
548
        <span class="sub_permission reopen_closed_invoices_subpermission"> Reopen closed invoices </span>
554
        <span class="sub_permission reopen_closed_invoices_subpermission"> Reopen closed invoices </span>
549
        <span class="permissioncode">([% name | html %])</span>
555
        <span class="permissioncode">([% name | html %])</span>
(-)a/t/Koha/Auth/Permissions.t (-1 / +2 lines)
Lines 128-133 subtest 'superlibrarian tests' => sub { Link Here
128
        'CAN_user_borrowers_delete_borrowers'                       => 1,
128
        'CAN_user_borrowers_delete_borrowers'                       => 1,
129
        'CAN_user_borrowers_edit_borrowers'                         => 1,
129
        'CAN_user_borrowers_edit_borrowers'                         => 1,
130
        'CAN_user_borrowers_list_borrowers'                         => 1,
130
        'CAN_user_borrowers_list_borrowers'                         => 1,
131
        'CAN_user_borrowers_manage_borrower_quotas'                 => 1,
132
        'CAN_user_borrowers_view_borrower_quotas'                   => 1,
131
        'CAN_user_borrowers_view_borrower_infos_from_any_libraries' => 1,
133
        'CAN_user_borrowers_view_borrower_infos_from_any_libraries' => 1,
132
        'CAN_user_borrowers'                                        => 1,
134
        'CAN_user_borrowers'                                        => 1,
133
        'CAN_user_cash_management_anonymous_refund'                 => 1,
135
        'CAN_user_cash_management_anonymous_refund'                 => 1,
134
- 

Return to bug 38924