ACQ, VIEW_FUND, permission issue 2.3.4

Bug #1183340 reported by Steve Callender
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.3
Fix Released
Medium
Unassigned
2.4
Fix Released
Medium
Unassigned

Bug Description

When a user has just the VIEW_FUND permission and not the ADMIN_ACQ_FUND permission, (to allow the users to just view the funds and not edit them), an error occurs on the system that causes none of the funds to display.

It looks like the code tries to sort editable entries, and when you can only VIEW them, there is nothing to sort causing the list to be empty. Here is an example log,

open-ils.pcrud open-ils.pcrud.search.acqf "(removed token)", {"year":"2013","org":[4]}, {"order_by":[{"class":"acqf","field":"org","compare":{"in":[]},"direction":"desc"},{"class":"acqf","field":"name"}],"limit":15,"flesh":1,"flesh_fields":{"acqf":["spent_balance","combined_balance","spent_total","encumbrance_total","debit_total","allocation_total"]}}

Notice above the compare "in" list is empty. This causes the following error,

open-ils.pcrud: Empty IN list

Looks like we need to avoid this sort if the user can't edit any funds and only view.

Steve

Revision history for this message
Bill Erickson (berick) wrote :

Fix pushed to working/user/berick/lp1183340-acq-fund-list-perm-repair

tags: added: acq pullrequest
Changed in evergreen:
milestone: none → 2.5.0-m1
Revision history for this message
Steve Callender (stevecallender) wrote :

Bill,

I tested your patch on a 2.3.4 test system and it worked perfectly.

Steve

Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Dan Wells (dbw2) wrote :

Tested, pushed back through 2.3. Thanks, Bill and Steve!

Changed in evergreen:
status: Triaged → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.