Bug 31698: Add alter_hold_targets permission

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2025-03-12 17:30:24 +00:00
parent cd108870fd
commit ceb5ec8b15
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,20 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "31698",
description => "Add a new permission for moving holds",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(
q{
INSERT IGNORE permissions (module_bit, code, description) VALUES (6, 'alter_hold_targets', 'Move holds between items and records')
}
);
say $out "Added new permission 'alter_hold_targets'";
},
};

View File

@ -52,6 +52,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
( 6, 'place_holds', 'Place holds for patrons'),
( 6, 'modify_holds_priority', 'Modify holds priority'),
( 6, 'alter_hold_targets', 'Move holds between items and records'),
( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
( 9, 'fast_cataloging', 'Fast cataloging'),
( 9, 'advanced_editor', 'Use the advanced cataloging editor (requires edit_catalogue)'),

View File

@ -248,6 +248,9 @@
[%- CASE 'place_holds' -%]
<span class="sub_permission place_holds_subpermission"> Place holds for patrons </span>
<span class="permissioncode">([% name | html %])</span>
[%- CASE 'alter_hold_targets' -%]
<span class="sub_permission place_holds_subpermission"> Move holds between items and records </span>
<span class="permissioncode">([% name | html %])</span>
[%- CASE 'delete_all_items' -%]
<span class="sub_permission delete_all_items_subpermission"> Delete all items at once </span>
<span class="permissioncode">([% name | html %])</span>