@@ -, +, @@ make sure to enable the new feature to limit editing of items your group, you should have full editing abilities. If an item is from a different group, you should only be able to make the same changes you would be able to if IndependentBranches were. --- installer/data/mysql/atomicupdate/bug_20256.perl | 11 +++++++++++ installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/userpermissions.sql | 1 + 3 files changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20256.perl --- a/installer/data/mysql/atomicupdate/bug_20256.perl +++ a/installer/data/mysql/atomicupdate/bug_20256.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_any_item', 'Edit any item reguardless of home library');" ); + + if ( !column_exists( 'library_groups', 'ft_limit_item_editing' ) ) { + $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_limit_item_editing tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20256 - Add ability to limit editing of items to home library)\n"; +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -4261,6 +4261,7 @@ CREATE TABLE library_groups ( title VARCHAR(100) NULL DEFAULT NULL, -- Short description of the goup description MEDIUMTEXT NULL DEFAULT NULL, -- Longer explanation of the group, if necessary ft_hide_patron_info tinyint(1) NOT NULL DEFAULT 0, -- Turn on the feature "Hide patron's info" for this group + ft_limit_item_editing tinyint(1) NOT NULL DEFAULT 0, -- Turn on the feature "Hide patron's info" for this group ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0, -- Use this group for staff side search groups ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0, -- Use this group for opac side search groups ft_local_hold_group tinyint(1) NOT NULL DEFAULT 0, -- Use this group to identify libraries as pick up location for holds --- a/installer/data/mysql/userpermissions.sql +++ a/installer/data/mysql/userpermissions.sql @@ -44,6 +44,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_items', 'Edit items'), ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'), ( 9, 'delete_all_items', 'Delete all items at once'), + ( 9, 'edit_any_item', 'Edit any item reguardless of home library'), (10, 'payout', 'Perform account payout action'), (10, 'refund', 'Perform account refund action'), (10, 'discount', 'Perform account discount action'), --