Bugzilla – Attachment 120664 Details for
Bug 26346
Add option to make a public list editable by library staff only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26346: Add option to Remove items from list
Bug-26346-Add-option-to-Remove-items-from-list.patch (text/plain), 1.41 KB, created by
Alex Buckley
on 2021-05-07 09:23:28 UTC
(
hide
)
Description:
Bug 26346: Add option to Remove items from list
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2021-05-07 09:23:28 UTC
Size:
1.41 KB
patch
obsolete
>From 79eb9db0064c43af74873d0a699dc15dde084afc Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 30 Apr 2021 05:00:58 +0000 >Subject: [PATCH] Bug 26346: Add option to Remove items from list > >Test plan: >1. Follow the test plans in the previous two patches >2. Create a public list with 'Allow changes to contents from'='Staff >only' >3. Login to the staff client as a different user >4. Add items to the list >5. Remove items from the list >6. Confirm items were removed >7. Log into the OPAC as the same user as step 3 >8. Remove items from the list > >Sponsored-by: Horowhenua Library Trust, New Zealand >--- > Koha/Virtualshelf.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Virtualshelf.pm b/Koha/Virtualshelf.pm >index 6104912de0..56ffe42d74 100644 >--- a/Koha/Virtualshelf.pm >+++ b/Koha/Virtualshelf.pm >@@ -209,8 +209,11 @@ sub remove_biblios { > my $borrowernumber = $params->{borrowernumber}; > return unless @$biblionumbers; > >+ my $patron = Koha::Patrons->find( $borrowernumber ); >+ my $staffuser = 1 if ( haspermission( $patron->userid, {'catalogue' => 1 })); > my $number_removed = 0; > if( ( $self->owner == $borrowernumber && $self->allow_change_from_owner ) >+ || ( $staffuser && $self->allow_change_from_staff ) > || $self->allow_change_from_others ) { > $number_removed += $self->get_contents->search({ > biblionumber => $biblionumbers, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26346
:
119686
|
120663
|
120664
|
120665
|
120909
|
120910
|
120953
|
120954
|
121511
|
121512
|
122033
|
122034
|
122533
|
122535
|
122536
|
122537
|
122538
|
122539
|
122540
|
122685
|
122686
|
122687
|
122688
|
122689
|
122691
|
124010
|
124011
|
125436
|
125472
|
125914
|
125915
|
125916
|
125917
|
127556
|
127557
|
127558
|
127559
|
127560
|
128017
|
128018
|
128019
|
128020
|
128021
|
128022
|
128023
|
128383
|
128384
|
128385
|
131699
|
131700
|
131757
|
131764
|
132373
|
132475
|
132476
|
132477
|
132478
|
132479
|
132751
|
132752
|
132753
|
132754
|
132755