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.
Created attachment 89372 [details] [review] 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.
Created attachment 100042 [details] [review] 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
Created attachment 100096 [details] [review] 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>
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
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11.x