does not work with more than 1 item

Bug #1594617 reported by Jason Stephenson
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen: 2.9, 2.10, and master
OpenSRF Version: N/A
Pg Version: N/A

The documentation and most of the code for says it can accept an array ref of items in the item argument.

However, the permission checking code assumes that only 1 item is present. Thus, passing an array of items leads to a Perl error:

Can't call method "bucket" on unblessed reference at /usr/local/share/perl/5.18.2/OpenILS/Application/Actor/ line 314.

I used code like that in the attachment to trigger it. You would need to modify it for it to "work" in your environment.

I can think of a couple of ways to fix it.

1) Is to loop over all of the bucket items, checking the permission for each bucket, and returning as soon as there is a failure. This makes no assumptions about the items being in the same bucket.

2) Is to simply check the permissions on the bucket of the first item. This assumes that all the items are being added to the same bucket.

I'm inclined to go with #1, but I'll leave that open for discussion.

Revision history for this message
Jason Stephenson (jstephenson) wrote :
tags: added: buckets-item
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers