[Bug 28999] New: Add module for Allowlist / ColumnFilter
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Bug ID: 28999 Summary: Add module for Allowlist / ColumnFilter Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Idea is to have a module that helps you filter columns of a certain table for various use cases. Like checking parameters from user interface, or in the API, etc. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124820&action=edit Bug 28999: Introduce Allowlist Based on work of David Cook and Jonathan Druart. Removed the patron example here. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124821&action=edit Bug 28999: Rename to AllowList -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124822 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124822&action=edit Bug 28999: Additional check method, some parameter changes License for module. Remove interface parameter in new. Add dry_run parameter to apply. Add arrayref as input for apply. Add check as shortcut for apply with dry_run. Add tests. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124823&action=edit Bug 28999: Remove (un)load, add reset; apply returns result now Remove load but add $defaults in new. Replace unload by reset, restoring defaults. Replace warn en verbose by a dump variable in apply. Do not return $blocked anymore but return the filtered input in apply. New check method returns true when no entries were blocked. New keys method to list current allow list entries. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124824 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124824&action=edit Bug 28999: Add Koha::DenyList as counterpart -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add module for Allowlist / |Add Koha::AllowList, |ColumnFilter |DenyList and | |Koha::Object::ColumnSet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The code for AllowList is generic now. But we need the ColumnSet to apply it to Koha objects in various ways. This is the idea: Say $city is a Koha object. $city->filter('opac_ui') returns city data through the opac_ui filter which is just a set of columns for some purpose. $city->filter('staff') could return some other subset or even nothing when the set does not exist. The sub filter calls Koha::Object::ColumnSet with the requested column set name. The module calls the corresponding DBIx schema where we add a sub called column_set_info containing the lists we need like a list for opac_ui. ColumnSet runs a Koha::AllowList based on that list over the object data. Hang on a little bit. Submitting some concept code shortly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- I spent a lot of time thinking this morning, and I'm not sure I see a purpose for filtering outbound data besides for the public API. And on the flipside the API has its own input validation so it wouldn't need an inbound data filter whereas the HTML UI does. I just wonder if we're trying to make this all too generic/comprehensive. The original premise was just filtering input from HTML forms. Maybe it makes more sense to do a RFC? I think this might be the 3rd or 4th report now for allow lists. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124828 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124828&action=edit Bug 28999: {CONCEPT] Introduce Koha::Object::ColumnSet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please add feedback on especially the last patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28935 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Moving the ColumnSet to its own report. Bug 29029 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124828|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add Koha::AllowList, |Add Koha::AllowList and |DenyList and |DenyList |Koha::Object::ColumnSet | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #9)
Please add feedback on especially the last patch.
Here is my current stand: These two objects are so generic and close to hash slice and invert that I removed them from ColumnSet. They are real nice objects, but we can live without them? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|ASSIGNED |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28999 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Waste of time? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org