[Koha-bugs] [Bug 26346] Add option to make a public list editable by library staff only

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 9 16:18:05 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26346

--- Comment #59 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
sub can_be_deleted {
    my ( $self, $borrowernumber ) = @_;

    return 0 unless $borrowernumber;
    return 1 if $self->owner == $borrowernumber;

    my $patron = Koha::Patrons->find( $borrowernumber );

    return 1 if $self->is_public and haspermission( $patron->userid, { lists =>
'delete_public_lists' } );

    return 0;
}

This is still different from surrounding code as to testing Patrons::find.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list