Bugzilla – Attachment 178296 Details for
Bug 35434
Non-superlibrarians should not place holds in other libraries when IndependentBranches is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35434: Prevent non-superlibrarians from placing holds in other libraries when using IndependentBranches
Bug-35434-Prevent-non-superlibrarians-from-placing.patch (text/plain), 3.29 KB, created by
Hammat wele
on 2025-02-18 17:50:58 UTC
(
hide
)
Description:
Bug 35434: Prevent non-superlibrarians from placing holds in other libraries when using IndependentBranches
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-02-18 17:50:58 UTC
Size:
3.29 KB
patch
obsolete
>From 68b124dc0eae843bb4470ea62371e18135a398dd Mon Sep 17 00:00:00 2001 >From: Emily-Rose Francoeur <emily-rose.francoeur@inLibro.com> >Date: Wed, 29 Nov 2023 10:42:54 -0500 >Subject: [PATCH] Bug 35434: Prevent non-superlibrarians from placing holds in > other libraries when using IndependentBranches > >When IndependentBranches is enabled and canreservefromotherbranches >is set to don't allow, then non-superlibrarians should not be able to >place holds for other libraries. > >Test plan: >1. Appy the patch. >2. In Koha administration > System preferences, set: > - IndependentBranches: Yes > - canreservefromotherbranches: Don't allow >3. In Koha administration > Circulation and fines rules, check that > you have a rule for all patron categories and all item types, with > unlimited holds. >4. Find (or create) a staff patron for a library other than Centerville: > - Change the username and password so you can log in as the > staff patron. > - Add permissions to the staff patron (More > Set permissions): > . Staff access, allows viewing of catalogue in staff interface > . Add, modify and view patron information > . Place and modify holds for patrons >5. Find (or create) a patron with the same home library as the > staff patron in step 4. >6. Find (or create) a record with an item where the home and > current library are the same as the staff patron in step 3 and the > patron in step 5. >7. As a superlibrarian place a hold for the record from step 6 > using the patron from step 5: > - If placing a hold for the next available item, the "Pickup at" > dropdown list should list all libraies. > - If placing a hold on a specific item, the dropdown list for the > "Allowed pickup locations" column for each item should also list > all libraries. > - After placing the hold, in the "Existing holds" table, the dropdown > list for each hold in the "Pickup library" column should > also list all libraries. >8. Log out from the staff interface and login with the staff patron > from step 4. >9. Find the record from step 6 and place a hold using the patron from > step 5 - the library dropdown list should be limited to the > item's home library: > - If placing a hold for the next available item, the "Pickup at" > dropdown list should only list the item's home library. > - If placing a hold on a specific item, the dropdown list for the > "Allowed pickup locations" column for each item should also only > list the item's home library. > - After placing the hold, in the "Existing holds" table, the > "Pickup library" column should now only show the item's home > librayr, with no dropdown list. > >Signed-off-by: Anni Rajala <anni.rajala@turku.fi> >Signed-off-by: baptiste <baptiste.bayche@inlibro.com> >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Item.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index e950118336..60144f96d0 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1032,6 +1032,8 @@ is not passed. > sub pickup_locations { > my ( $self, $params ) = @_; > >+ return Koha::Libraries->search( { branchcode => $self->holdingbranch } ) if C4::Context->preference("IndependentBranches") && !C4::Context->IsSuperLibrarian(); >+ > Koha::Exceptions::MissingParameter->throw( parameter => 'patron' ) > unless exists $params->{patron}; > >-- >2.34.1
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 35434
:
159346
|
161509
|
166648
|
169917
|
169918
|
169919
|
176045
|
176046
|
176047
| 178296 |
178297
|
178298