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
i$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 (-3 / +3 lines)
Lines 34-40 Link Here
34
    <div class="btn-group">
34
    <div class="btn-group">
35
    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
35
    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
36
        <ul class="dropdown-menu">
36
        <ul class="dropdown-menu">
37
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
37
            [% IF CAN_user_editcatalogue_delete_any_record %]
38
            <li><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
38
            <li><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">Edit record</a></li>
39
            [% END %]
39
            [% END %]
40
40
Lines 71-78 Link Here
71
                <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]&amp;op=duplicate">Edit as new (duplicate)</a></li>
71
                <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]&amp;op=duplicate">Edit as new (duplicate)</a></li>
72
                <li><a href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
72
                <li><a href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li>
73
            [% END %]
73
            [% END %]
74
74
	    
75
            [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
75
	    [% IF CAN_user_editcatalogue_delete_any_record %]
76
                [% IF ( count ) %]
76
                [% IF ( count ) %]
77
                    <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>
77
                    <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>
78
                [% ELSIF ( biblio.subscriptions.count ) %]
78
                [% ELSIF ( biblio.subscriptions.count ) %]
(-)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