https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050
--- Comment #42 from Jonathan Druart <[email protected]> --- QA comment: 1. See previous comment re the permission 2. 2 occurrences of Data::Dumper left in the patches 3. Why isn't Koha::REST::V1::List::update using $shelf->can_be_managed to know if the logged in user can edit the list? 4. What about the other logic in virtualshelves/shelves.pl? 126 $sortfield = 'title' 127 unless grep { $_ eq $sortfield } qw( title author copyrightdate publicationyear itemcallnumber dateadded ); 128 if ( $sortfield eq 'copyrightdate' and C4::Context->preference('marcflavour') eq 'UNIMARC' ) { 129 $sortfield = 'publicationyear'; 130 } Shouldn't it be port to the REST API endpoint as well? 5. Same as 3 for deletion: why isn't the logic the same as the shelves.pl controller? + if ( $list->can_be_deleted( $user->id ) + || $list->allow_change_from_staff + || $list->allow_change_from_others + || ( $list->is_public && C4::Auth::haspermission( $user->userid, { lists => 'delete_public_lists' } ) ) ) vs 158 if ($shelf) { 159 if ( $shelf->can_be_deleted($loggedinuser) ) { 160 eval { $shelf->delete; }; I don't want to know which one is correct, but I expect to see the exact same code in both places. 6. What if the pref `virtualshelves` is off? 7. QA script is failing: [FAIL] t/db_dependent/api/v1/lists.t FAIL test_no_warnings 'use Test::NoWarnings' must be present in this test file. [FAIL] t/db_dependent/api/v1/public/lists.t FAIL file_permissions File must have the exec flag -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
