Bug 31791: DB changes

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomas Cohen Arazi 2024-02-02 16:24:58 -03:00 committed by Katrin Fischer
parent e8595f9d62
commit 28a2f48ea8
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,26 @@
use Modern::Perl;
return {
bug_number => "31791",
description => "Add the ability to lock record modification",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
( 9, 'edit_locked_records', 'Edit locked records');
}
);
say $out "Added new permission 'editcatalogue.edit_locked_records'";
$dbh->do(
q{
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
( 9, 'set_record_sources', 'Set record source for records');
}
);
say $out "Added new permission 'editcatalogue.set_record_sources'";
},
};

View File

@ -61,6 +61,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES
( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'),
( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'),
( 9, 'edit_any_item', 'Edit any item regardless of home library'),
( 9, 'edit_locked_records', 'Edit locked records'),
( 9, 'set_record_sources', 'Set record source'),
(10, 'payout', 'Perform account payout action'),
(10, 'refund', 'Perform account refund action'),
(10, 'discount', 'Perform account discount action'),