diff --git a/installer/data/mysql/atomicupdate/bug_31791.pl b/installer/data/mysql/atomicupdate/bug_31791.pl new file mode 100755 index 0000000000..3d1998c55a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_31791.pl @@ -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'"; + }, +}; diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index e27a8749b4..a132b83e20 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -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'),