View | Details | Raw Unified | Return to bug 20256
Collapse All | Expand All

(-)a/Koha/Schema/Result/LibraryGroup.pm (-3 / +4 lines)
Lines 257-266 sub koha_objects_class { Link Here
257
}
257
}
258
258
259
__PACKAGE__->add_columns(
259
__PACKAGE__->add_columns(
260
    '+ft_hide_patron_info' => { is_boolean => 1 },
260
    '+ft_hide_patron_info'    => { is_boolean => 1 },
261
    '+ft_search_groups_opac' => { is_boolean => 1 },
261
    '+ft_search_groups_opac'  => { is_boolean => 1 },
262
    '+ft_search_groups_staff' => { is_boolean => 1 },
262
    '+ft_search_groups_staff' => { is_boolean => 1 },
263
    '+ft_local_hold_group' => { is_boolean => 1 },
263
    '+ft_local_hold_group'    => { is_boolean => 1 },
264
    '+ft_limit_item_editing'  => { is_boolean => 1 },
264
);
265
);
265
266
266
1;
267
1;
(-)a/installer/data/mysql/atomicupdate/bug_20256.perl (+19 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_any_item', 'Edit any item reguardless of home library');" );
4
5
    $dbh->do(q{
6
        INSERT INTO user_permissions ( borrowernumber, module_bit, code )
7
        SELECT borrowernumber, '9', 'edit_any_item'
8
        FROM user_permissions
9
        WHERE module_bit = '9'
10
          AND code = 'edit_items'
11
    });
12
13
    if ( !column_exists( 'library_groups', 'ft_limit_item_editing' ) ) {
14
        $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_limit_item_editing tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" );
15
    }
16
17
    SetVersion( $DBversion );
18
    print "Upgrade to $DBversion done (Bug 20256 - Add ability to limit editing of items to home library)\n";
19
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 3871-3876 CREATE TABLE `library_groups` ( Link Here
3871
  `title` varchar(100) DEFAULT NULL COMMENT 'Short description of the goup',
3871
  `title` varchar(100) DEFAULT NULL COMMENT 'Short description of the goup',
3872
  `description` mediumtext DEFAULT NULL COMMENT 'Longer explanation of the group, if necessary',
3872
  `description` mediumtext DEFAULT NULL COMMENT 'Longer explanation of the group, if necessary',
3873
  `ft_hide_patron_info` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Turn on the feature ''Hide patron''s info'' for this group',
3873
  `ft_hide_patron_info` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Turn on the feature ''Hide patron''s info'' for this group',
3874
  `ft_limit_item_editing` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Turn on the feature "Limit item editing by group" for this group',
3874
  `ft_search_groups_opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for staff side search groups',
3875
  `ft_search_groups_opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for staff side search groups',
3875
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
3876
  `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups',
3876
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
3877
  `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds',
(-)a/installer/data/mysql/mandatory/userpermissions.sql (-1 / +1 lines)
Lines 56-61 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
56
   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
56
   ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'),
57
   ( 9, 'delete_all_items', 'Delete all items at once'),
57
   ( 9, 'delete_all_items', 'Delete all items at once'),
58
   ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'),
58
   ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'),
59
   ( 9, 'edit_any_item', 'Edit any item regardless of home library'),
59
   (10, 'payout', 'Perform account payout action'),
60
   (10, 'payout', 'Perform account payout action'),
60
   (10, 'refund', 'Perform account refund action'),
61
   (10, 'refund', 'Perform account refund action'),
61
   (10, 'discount', 'Perform account discount action'),
62
   (10, 'discount', 'Perform account discount action'),
62
- 

Return to bug 20256