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

(-)a/installer/data/mysql/atomicupdate/bug_34069.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "34069",
6
    description => "Add new permission restore_deleted_borrowers",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{INSERT IGNORE permissions (module_bit, code, description) VALUES (4, 'restore_deleted_borrowers', 'Restore deleted patrons')}
13
        );
14
        say_success( $out, "Added new permission 'restore_deleted_borrowers'" );
15
16
        $dbh->do(
17
            q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AllowDeletedPatronRestoration','0',NULL,'If enabled, allows for the restoration of deleted borrowers from the deletedborrowers table','YesNo')}
18
        );
19
20
        say_success( $out, "Added new system preference 'AllowDeletedPatronRestoration'" );
21
    },
22
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 29-34 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
29
('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'),
29
('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'),
30
('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'),
30
('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'),
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
32
('AllowDeletedPatronRestoration', '0', NULL, 'If enabled, allows for the restoration of deleted borrowers from the deletedborrowers table','YesNo'),
32
('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
33
('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'),
33
('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
34
('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'),
34
('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
35
('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'),
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 52-57 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
52
   ( 4, 'merge_borrowers', 'Merge patrons'),
52
   ( 4, 'merge_borrowers', 'Merge patrons'),
53
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
53
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
54
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
54
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
55
   ( 4, 'restore_deleted_borrowers', 'Restore deleted patrons'),
55
   ( 6, 'place_holds', 'Place holds for patrons'),
56
   ( 6, 'place_holds', 'Place holds for patrons'),
56
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
57
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
57
   ( 6, 'alter_hold_targets', 'Move holds between items and records'),
58
   ( 6, 'alter_hold_targets', 'Move holds between items and records'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+3 lines)
Lines 248-253 Link Here
248
    [%- CASE 'send_messages_to_borrowers' -%]
248
    [%- CASE 'send_messages_to_borrowers' -%]
249
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
249
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
250
        <span class="permissioncode">([% name | html %])</span>
250
        <span class="permissioncode">([% name | html %])</span>
251
    [%- CASE 'restore_deleted_borrowers' -%]
252
        <span class="sub_permission restore_deleted_borrowers_subpermission"> Restore deleted patrons </span>
253
        <span class="permissioncode">([% name | html %])</span>
251
    [%- CASE 'modify_holds_priority' -%]
254
    [%- CASE 'modify_holds_priority' -%]
252
        <span class="sub_permission modify_holds_priority_subpermission"> Modify holds priority </span>
255
        <span class="sub_permission modify_holds_priority_subpermission"> Modify holds priority </span>
253
        <span class="permissioncode">([% name | html %])</span>
256
        <span class="permissioncode">([% name | html %])</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+7 lines)
Lines 448-453 Patrons: Link Here
448
         - days and remove anonymized patron accounts after
448
         - days and remove anonymized patron accounts after
449
         - pref: PatronRemovalDelay
449
         - pref: PatronRemovalDelay
450
         - "days.<br>IMPORTANT: No action is performed when these delays are empty (no text). But a zero value ('0') is interpreted as no delay (do it now)! The actions are performed by the cleanup database cron job."
450
         - "days.<br>IMPORTANT: No action is performed when these delays are empty (no text). But a zero value ('0') is interpreted as no delay (do it now)! The actions are performed by the cleanup database cron job."
451
     -
452
         - pref: AllowDeletedPatronRestoration
453
           choices:
454
               1: "Allow"
455
               0: "Don't allow"
456
         - 'for the restoration of deleted borrowers from the deletedborrowers table.'
457
    Security:
451
     -
458
     -
452
         - pref: CookieConsent
459
         - pref: CookieConsent
453
           choices:
460
           choices:
(-)a/t/Koha/Auth/Permissions.t (-1 / +1 lines)
Lines 131-136 subtest 'superlibrarian tests' => sub { Link Here
131
        'CAN_user_borrowers_edit_borrowers'                         => 1,
131
        'CAN_user_borrowers_edit_borrowers'                         => 1,
132
        'CAN_user_borrowers_list_borrowers'                         => 1,
132
        'CAN_user_borrowers_list_borrowers'                         => 1,
133
        'CAN_user_borrowers_api_validate_password'                  => 1,
133
        'CAN_user_borrowers_api_validate_password'                  => 1,
134
        'CAN_user_borrowers_restore_deleted_borrowers'              => 1,
134
        'CAN_user_borrowers_view_borrower_infos_from_any_libraries' => 1,
135
        'CAN_user_borrowers_view_borrower_infos_from_any_libraries' => 1,
135
        'CAN_user_borrowers'                                        => 1,
136
        'CAN_user_borrowers'                                        => 1,
136
        'CAN_user_cash_management_anonymous_refund'                 => 1,
137
        'CAN_user_cash_management_anonymous_refund'                 => 1,
137
- 

Return to bug 34069