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

(-)a/C4/Auth.pm (+1 lines)
Lines 2305-2310 sub get_cataloguing_page_permissions { Link Here
2305
        marc_modification_templates
2305
        marc_modification_templates
2306
        records_batchdel
2306
        records_batchdel
2307
        records_batchmod
2307
        records_batchmod
2308
        records_restore
2308
        stage_marc_import
2309
        stage_marc_import
2309
        upload_cover_images
2310
        upload_cover_images
2310
    );
2311
    );
(-)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 132-137 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
132
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
132
   (13, 'records_batchmod', 'Perform batch modification of records (biblios or authorities)'),
133
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
133
   (13, 'marc_modification_templates', 'Manage marc modification templates'),
134
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
134
   (13, 'records_batchdel', 'Perform batch deletion of records (bibliographic or authority)'),
135
   (13, 'records_restore', 'Restore deleted records'),
135
   (13, 'access_files', 'Access to the files stored on the server'),
136
   (13, 'access_files', 'Access to the files stored on the server'),
136
   (13, 'upload_general_files', 'Upload any file'),
137
   (13, 'upload_general_files', 'Upload any file'),
137
   (13, 'upload_manage', 'Manage uploaded files'),
138
   (13, 'upload_manage', 'Manage uploaded files'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+3 lines)
Lines 460-465 Link Here
460
    [%- CASE 'records_batchmod' -%]
460
    [%- CASE 'records_batchmod' -%]
461
        <span class="sub_permission records_batchmod_subpermission"> Perform batch modification of records (biblios or authorities) </span>
461
        <span class="sub_permission records_batchmod_subpermission"> Perform batch modification of records (biblios or authorities) </span>
462
        <span class="permissioncode">([% name | html %])</span>
462
        <span class="permissioncode">([% name | html %])</span>
463
    [%- CASE 'records_restore' -%]
464
        <span class="sub_permission records_restore_subpermission"> Restore deleted records </span>
465
        <span class="permissioncode">([% name | html %])</span>
463
    [%- CASE 'rotating_collections' -%]
466
    [%- CASE 'rotating_collections' -%]
464
        <span class="sub_permission rotating_collections_subpermission"> Manage rotating collections </span>
467
        <span class="sub_permission rotating_collections_subpermission"> Manage rotating collections </span>
465
        <span class="permissioncode">([% name | html %])</span>
468
        <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