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

(-)a/Koha/Schema/Result/Virtualshelve.pm (+8 lines)
Lines 217-221 sub koha_objects_class { Link Here
217
    'Koha::Virtualshelves';
217
    'Koha::Virtualshelves';
218
}
218
}
219
219
220
__PACKAGE__->add_columns(
221
    '+public' => { is_boolean => 1 },
222
);
223
224
__PACKAGE__->add_columns(
225
    '+allow_change_from_staff' => { is_boolean => 1 },
226
);
227
220
# You can replace this text with custom code or comments, and it will be preserved on regeneration
228
# You can replace this text with custom code or comments, and it will be preserved on regeneration
221
1;
229
1;
(-)a/t/db_dependent/Virtualshelves.t (-2 / +1 lines)
Lines 327-333 subtest 'Shelf permissions' => sub { Link Here
327
    is( $public_shelf->can_be_deleted( $patron3->{borrowernumber} ), 0, 'Public list should not be deleted by someone with no special permissions' );
327
    is( $public_shelf->can_be_deleted( $patron3->{borrowernumber} ), 0, 'Public list should not be deleted by someone with no special permissions' );
328
    is( $public_shelf->can_be_deleted( $patron4->{borrowernumber} ), 0, 'Public list should not be deleted by someone with the edit_public_lists sub-permission checked' );
328
    is( $public_shelf->can_be_deleted( $patron4->{borrowernumber} ), 0, 'Public list should not be deleted by someone with the edit_public_lists sub-permission checked' );
329
329
330
    is( $public_shelf->can_be_managed( $patron1->{borrowernumber} ), 1, 'The owner should be able to manage thier list' );
330
    is( $public_shelf->can_be_managed( $patron1->{borrowernumber} ), 1, 'The owner should be able to manage their list' );
331
    is( $public_shelf->can_be_managed( $patron2->{borrowernumber} ), 0, 'Public list should not be managed by another staff member' );
331
    is( $public_shelf->can_be_managed( $patron2->{borrowernumber} ), 0, 'Public list should not be managed by another staff member' );
332
    is( $public_shelf->can_be_managed( $patron3->{borrowernumber} ), 0, 'Public list should not be managed by someone with no special permissions' );
332
    is( $public_shelf->can_be_managed( $patron3->{borrowernumber} ), 0, 'Public list should not be managed by someone with no special permissions' );
333
    is( $public_shelf->can_be_managed( $patron4->{borrowernumber} ), 1, 'Public list should be managed by someone with the edit_public_lists sub-permission checked' );
333
    is( $public_shelf->can_be_managed( $patron4->{borrowernumber} ), 1, 'Public list should be managed by someone with the edit_public_lists sub-permission checked' );
334
- 

Return to bug 26346