[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 15:53:59 CET 2021


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

--- Comment #17 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
OK.. this works as-is, mostly, but I think we can continue to refine it.

However, currently, there is one test failing and I couldn't grok how to fix
it: `t/db_dependent/api/v1/patrons.t`

In a future place, I'd be tempted to try and not rely on 'search_related' from
the plural class from the singular. I'm wondering if we could instead just have
a 'can_be_seen' or 'accessible' method at the object/singular level.  The
challenge will be how do we prevent db calls etc in that function when it's
being called in the iterative loop to build a to_api resultset... we need a way
of caching the 'why I cannot be seen' functionality at the set level.. hence I
think I can see where Tomas was going trying to use search_related.

Great work so far..

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


More information about the Koha-bugs mailing list