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

(-)a/C4/Auth.pm (+1 lines)
Lines 2370-2375 sub get_cataloguing_page_permissions { Link Here
2370
        marc_modification_templates
2370
        marc_modification_templates
2371
        records_batchdel
2371
        records_batchdel
2372
        records_batchmod
2372
        records_batchmod
2373
        records_restore
2373
        stage_marc_import
2374
        stage_marc_import
2374
        upload_cover_images
2375
        upload_cover_images
2375
    );
2376
    );
(-)a/api/v1/swagger/paths/deleted_biblios.yaml (-1 / +1 lines)
Lines 171-174 Link Here
171
          $ref: "../swagger.yaml#/definitions/error"
171
          $ref: "../swagger.yaml#/definitions/error"
172
    x-koha-authorization:
172
    x-koha-authorization:
173
      permissions:
173
      permissions:
174
        editcatalogue: edit_catalogue
174
        tools: records_restore
(-)a/api/v1/swagger/paths/deleted_items.yaml (-1 / +1 lines)
Lines 164-167 Link Here
164
          $ref: "../swagger.yaml#/definitions/error"
164
          $ref: "../swagger.yaml#/definitions/error"
165
    x-koha-authorization:
165
    x-koha-authorization:
166
      permissions:
166
      permissions:
167
        editcatalogue: edit_catalogue
167
        tools: records_restore
(-)a/installer/data/mysql/atomicupdate/bug_17387-item_biblio-undelete.pl (+21 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  => "17387",
6
    description => "Add records_restore permission",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{
13
            INSERT IGNORE INTO permissions (module_bit, code, description)
14
            VALUES (13, 'records_restore', 'Restore deleted records')
15
        }
16
        );
17
18
        say_success( $out, "Added new permission 'tools:records_restore'" );
19
20
    },
21
};
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 129-134 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
129
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
129
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
130
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
130
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
131
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
131
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
132
   (13, 'records_restore', 'Restore deleted records'),
132
   (13, 'access_files', 'Access to the files stored on the server'),
133
   (13, 'access_files', 'Access to the files stored on the server'),
133
   (13, 'upload_general_files', 'Upload any file'),
134
   (13, 'upload_general_files', 'Upload any file'),
134
   (13, 'upload_manage', 'Manage uploaded files'),
135
   (13, 'upload_manage', 'Manage uploaded files'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+3 lines)
Lines 445-450 Link Here
445
    [%- CASE 'records_batchmod' -%]
445
    [%- CASE 'records_batchmod' -%]
446
        <span class="sub_permission records_batchmod_subpermission"> Perform batch modification of records (biblios or authorities) </span>
446
        <span class="sub_permission records_batchmod_subpermission"> Perform batch modification of records (biblios or authorities) </span>
447
        <span class="permissioncode">([% name | html %])</span>
447
        <span class="permissioncode">([% name | html %])</span>
448
    [%- CASE 'records_restore' -%]
449
        <span class="sub_permission records_restore_subpermission"> Restore deleted records </span>
450
        <span class="permissioncode">([% name | html %])</span>
448
    [%- CASE 'rotating_collections' -%]
451
    [%- CASE 'rotating_collections' -%]
449
        <span class="sub_permission rotating_collections_subpermission"> Manage rotating collections </span>
452
        <span class="sub_permission rotating_collections_subpermission"> Manage rotating collections </span>
450
        <span class="permissioncode">([% name | html %])</span>
453
        <span class="permissioncode">([% name | html %])</span>
(-)a/tools/restore-records.pl (-2 / +1 lines)
Lines 29-35 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
29
        template_name => "tools/restore-records.tt",
29
        template_name => "tools/restore-records.tt",
30
        query         => $input,
30
        query         => $input,
31
        type          => "intranet",
31
        type          => "intranet",
32
        flagsrequired => { editcatalogue => 'edit_catalogue' },
32
        flagsrequired => { tools => 'records_restore' },
33
    }
33
    }
34
);
34
);
35
35
36
- 

Return to bug 17387