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

--- Comment #118 from Martin Renvoize <[email protected]> ---
(In reply to Jonathan Druart from comment #106)
> > I have written a quick follow-up on top of bug_33568 (that is based on top
> > of this one):
> > https://gitlab.com/joubu/Koha/-/commit/
> > 75b8cd39135966d2ea1b8a48df9aec4a3254d0d5
> > 
> > Would that work?
> 
> One thing that is not really nice is that, in Koha::Patron::to_api we are
> now having a json_patron and so not early returning, and we get 'restricted'
> in the response whereas the unredacted version should not contain it. But
> that would mean another call to is_accessible.

I've rebased the patchset and used your follow-up for inspiration but written
my own version.  Instead of returning an empty hash I've bound the redaction
inside our TO_JSON method and replace the column values with redaction
replacements..

I'm not sure if this is better or worse.  Also.. as you've highlighted we'll
need to deal with overloaded to_api methods somehow as they often add in data
after an inititial to_api call and we can also switch remove the code that
looks for undefined again if we go with either of these redaction techniques
instead.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to