[Bug 22529] New: /svc/members/search relies on quirks of haspermission
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Bug ID: 22529 Summary: /svc/members/search relies on quirks of haspermission 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: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Just parking this one here so we don't lose the comment from a closed bug 22483
(In reply to Martin Renvoize from comment #0)
This functionality was in use in two places. /svc/members/search and /Koha/REST/V1/Auth.pm.
About /svc/members/search: at first glance I think we should rewrite this code to adapt it, not the other way around.
-- 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=22529 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22483 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22483 [Bug 22483] haspermissions previously supported passing 'undef' for $flagsrequired -- 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=22529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22483 -- 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=22529 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=22529 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89372&action=edit Bug 22529: Use new C4::Auth::haspermission from svc/members/search The svc/members/search script can be used to retrieve patrons with a specific permission. This feature is only used once, to link patrons to funds. The code in the script is duplicated from what we have in C4::Auth::haspermission, and it makes sense to clean it. Test plan: Create a fund and add users to this fund. When you search for users you must only have a list of patrons with the acquisition.order_manage permission. -- 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=22529 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.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=22529 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89372|0 |1 is obsolete| | --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 100042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100042&action=edit Bug 22529: Use new C4::Auth::haspermission from svc/members/search The svc/members/search script can be used to retrieve patrons with a specific permission. This feature is only used once, to link patrons to funds. The code in the script is duplicated from what we have in C4::Auth::haspermission, and it makes sense to clean it. Test plan: Create a fund and add users to this fund. When you search for users you must only have a list of patrons with the acquisition.order_manage permission. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described. No errors -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100042|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 100096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100096&action=edit Bug 22529: Use new C4::Auth::haspermission from svc/members/search The svc/members/search script can be used to retrieve patrons with a specific permission. This feature is only used once, to link patrons to funds. The code in the script is duplicated from what we have in C4::Auth::haspermission, and it makes sense to clean it. Test plan: Create a fund and add users to this fund. When you search for users you must only have a list of patrons with the acquisition.order_manage permission. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described. No errors Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Took me a short while to wrap my head back around this one.. sorry it's languished so long.. I'm confident in the change, thanks for taking it on Jonathan. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22529 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #6 from Joy Nelson <joy@bywatersolutions.com> --- enhancement not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org