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

(-)a/installer/data/mysql/atomicupdate/bug_35953_-_add_delete_any_record_permission.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (9, 'delete_any_record', 'Delete any existing record')});
4
5
    NewVersion( $DBversion, undef, "Add delete_any_record user permission" );
6
}
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 59-64 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
59
   ( 9, 'delete_all_items', 'Delete all items at once'),
59
   ( 9, 'delete_all_items', 'Delete all items at once'),
60
   ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'),
60
   ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'),
61
   ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'),
61
   ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'),
62
   ( 9, 'delete_any_record', 'Delete any existing record'),
62
   ( 9, 'edit_any_item', 'Edit any item regardless of home library'),
63
   ( 9, 'edit_any_item', 'Edit any item regardless of home library'),
63
   (10, 'payout', 'Perform account payout action'),
64
   (10, 'payout', 'Perform account payout action'),
64
   (10, 'refund', 'Perform account refund action'),
65
   (10, 'refund', 'Perform account refund action'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (+6 lines)
Lines 75-85 Link Here
75
75
76
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
76
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
77
                [% IF ( count ) %]
77
                [% IF ( count ) %]
78
                  [% IF CAN_user_editcatalogue_delete_any_record %]
78
                    <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% count | html %] item(s) are attached to this record. You must delete all items before deleting this record." href="#">Delete record</a></li>
79
                    <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% count | html %] item(s) are attached to this record. You must delete all items before deleting this record." href="#">Delete record</a></li>
80
                  [% END %]
79
                [% ELSIF ( biblio.subscriptions.count ) %]
81
                [% ELSIF ( biblio.subscriptions.count ) %]
82
                  [% IF CAN_user_editcatalogue_delete_any_record %]
80
                    <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% biblio.subscriptions.count | html %] subscription(s) are attached to this record. You must delete all subscriptions before deleting this record." href="#">Delete record</a></li>
83
                    <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% biblio.subscriptions.count | html %] subscription(s) are attached to this record. You must delete all subscriptions before deleting this record." href="#">Delete record</a></li>
84
                  [% END %]
81
                [% ELSE %]
85
                [% ELSE %]
86
                  [% IF CAN_user_editcatalogue_delete_any_record %]
82
                    <li><a id="deletebiblio" data-order-manage="[% CAN_user_acquisition_order_manage | html %]" href="#">Delete record</a></li>
87
                    <li><a id="deletebiblio" data-order-manage="[% CAN_user_acquisition_order_manage | html %]" href="#">Delete record</a></li>
88
                  [% END %]
83
                [% END %]
89
                [% END %]
84
            [% END %]
90
            [% END %]
85
91
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 / +4 lines)
Lines 376-381 Link Here
376
        <span class="sub_permission fast_cataloging_subpermission">
376
        <span class="sub_permission fast_cataloging_subpermission">
377
            Fast cataloging
377
            Fast cataloging
378
        </span>
378
        </span>
379
    [%- CASE 'delete_any_record' -%]
380
        <span class="sub_permission delete_any_record_subpermission">
381
            Delete any existing record
382
        </span>
379
        <span class="permissioncode">([% name | html %])</span>
383
        <span class="permissioncode">([% name | html %])</span>
380
    [%- CASE 'manage_item_groups' -%]
384
    [%- CASE 'manage_item_groups' -%]
381
        <span class="sub_permission manage_item_groups_subpermission">
385
        <span class="sub_permission manage_item_groups_subpermission">
382
- 

Return to bug 35953