[Koha-bugs] [Bug 30232] Acquisition logged in user performance

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Mar 5 07:21:56 CET 2022


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

Fridolin Somers <fridolin.somers at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #131392|0                           |1
        is obsolete|                            |

--- Comment #5 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 131395
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131395&action=edit
Bug 30232: Logged in user performance for CanUserManageBasket()

Some acquisition methods can take borrowernumber or a Koha::Patron->unblessed.
When called with logged in user, sometimes in a loop, performance will be
better if fetching Koha::Patron of logged in user only once.

This patch optimises call for CanUserManageBasket().
Also removes a useless refetch of logged in patron.

You may benchmark on a vendor with a lot of baskets.

Test plan
1)
1.1) Log in to staff interface as user A with all acquisition permissions
1.2) Set system preference 'AcqViewBaskets' to 'created or managed by staff
member'
1.3) Create a new basket
1.4) Copy URL, ie /cgi-bin/koha/acqui/basket.pl?basketno=2
1.5) Click on 'Baskets' tab, you see the basket in table
2)
2.1) Log in to staff interface as user B with acquisition permissions
   but not 'order_manage_all'
2.2) Go to URL => You don't have access to basket
2.3) Click on 'Baskets' tab => you don't see the basket in table

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


More information about the Koha-bugs mailing list