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 (13, '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 130-135 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
130
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
130
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
131
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
131
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
132
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
132
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
133
   (13, 'restore_deleted_borrowers', 'Restore deleted patrons'),
133
   (13, 'access_files', 'Access to the files stored on the server'),
134
   (13, 'access_files', 'Access to the files stored on the server'),
134
   (13, 'upload_general_files', 'Upload any file'),
135
   (13, 'upload_general_files', 'Upload any file'),
135
   (13, 'upload_manage', 'Manage uploaded files'),
136
   (13, 'upload_manage', 'Manage uploaded files'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+3 lines)
Lines 251-256 Link Here
251
    [%- CASE 'send_messages_to_borrowers' -%]
251
    [%- CASE 'send_messages_to_borrowers' -%]
252
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
252
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
253
        <span class="permissioncode">([% name | html %])</span>
253
        <span class="permissioncode">([% name | html %])</span>
254
    [%- CASE 'restore_deleted_borrowers' -%]
255
        <span class="sub_permission restore_deleted_borrowers_subpermission"> Restore deleted patrons </span>
256
        <span class="permissioncode">([% name | html %])</span>
254
    [%- CASE 'modify_holds_priority' -%]
257
    [%- CASE 'modify_holds_priority' -%]
255
        <span class="sub_permission modify_holds_priority_subpermission"> Modify holds priority </span>
258
        <span class="sub_permission modify_holds_priority_subpermission"> Modify holds priority </span>
256
        <span class="permissioncode">([% name | html %])</span>
259
        <span class="permissioncode">([% name | html %])</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+7 lines)
Lines 454-459 Patrons: Link Here
454
         - days and remove anonymized patron accounts after
454
         - days and remove anonymized patron accounts after
455
         - pref: PatronRemovalDelay
455
         - pref: PatronRemovalDelay
456
         - "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."
456
         - "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."
457
     -
458
         - pref: AllowDeletedPatronRestoration
459
           choices:
460
               1: "Allow"
461
               0: "Don't allow"
462
         - 'for the restoration of deleted borrowers from the deletedborrowers table.'
463
    Security:
457
     -
464
     -
458
         - pref: CookieConsent
465
         - pref: CookieConsent
459
           choices:
466
           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