[Koha-bugs] [Bug 29523] Add a way to prevent embedding objects that should not be allowed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 26 17:34:20 CET 2021


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

--- Comment #19 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
I think we also need a regression test for the to_api method.. I might be just
overlooking it?

I have a question.. if you embed a plural on a route.. like 'patrons'.. should
the result be an array with 'null' gaps.. or an array that just contains valid
patrons without gaps?

This relates closely to my query regards should we return undefined vs should
we return something that states the user is restricted from the consumer's
view.

The use of search_limited in .search and .find methods (and thus returning 404)
makes me think for consistency we should not leave null gaps here.. but at the
same time knowing something exists but is restricted from view is meaningful
data.. so should .search and .find actually return 404 (or conversely 403/451
to show it exists but isn't allowed to be seen).

I can see uses cases for all of the above.. so perhaps it needs a header to
allow switching modes!>?

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


More information about the Koha-bugs mailing list