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

(-)a/Koha/Virtualshelf.pm (-3 / +3 lines)
Lines 187-193 sub add_biblio { Link Here
187
187
188
    # Check permissions
188
    # Check permissions
189
    my $patron = Koha::Patrons->find( $borrowernumber ) or return 0;
189
    my $patron = Koha::Patrons->find( $borrowernumber ) or return 0;
190
    return unless ( $self->owner == $borrowernumber && $self->allow_change_from_owner ) || ( $self->allow_change_from_staff && $patron->can_patron_change_staff_only_lists ) || $self->allow_change_from_others;
190
    return 0 unless ( $self->owner == $borrowernumber && $self->allow_change_from_owner ) || ( $self->allow_change_from_staff && $patron->can_patron_change_staff_only_lists ) || $self->allow_change_from_others;
191
191
192
    my $content = Koha::Virtualshelfcontent->new(
192
    my $content = Koha::Virtualshelfcontent->new(
193
        {
193
        {
Lines 238-244 sub can_be_deleted { Link Here
238
    return 0 unless $borrowernumber;
238
    return 0 unless $borrowernumber;
239
    return 1 if $self->owner == $borrowernumber;
239
    return 1 if $self->owner == $borrowernumber;
240
240
241
    my $patron = Koha::Patrons->find( $borrowernumber );
241
    my $patron = Koha::Patrons->find( $borrowernumber ) or return 0;
242
242
243
    return 1 if $self->is_public and haspermission( $patron->userid, { lists => 'delete_public_lists' } );
243
    return 1 if $self->is_public and haspermission( $patron->userid, { lists => 'delete_public_lists' } );
244
244
Lines 260-265 sub can_biblios_be_added { Link Here
260
    my ( $self, $borrowernumber ) = @_;
260
    my ( $self, $borrowernumber ) = @_;
261
261
262
    my $patron = Koha::Patrons->find( $borrowernumber ) or return 0;
262
    my $patron = Koha::Patrons->find( $borrowernumber ) or return 0;
263
263
    return 1
264
    return 1
264
      if $borrowernumber
265
      if $borrowernumber
265
      and ( ( $self->owner == $borrowernumber && $self->allow_change_from_owner ) or ( $self->allow_change_from_staff && $patron->can_patron_change_staff_only_lists ) or $self->allow_change_from_others );
266
      and ( ( $self->owner == $borrowernumber && $self->allow_change_from_owner ) or ( $self->allow_change_from_staff && $patron->can_patron_change_staff_only_lists ) or $self->allow_change_from_others );
266
- 

Return to bug 26346