[Bug 29939] New: Improve auth check in opac-ratings-ajax.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 Bug ID: 29939 Summary: Improve auth check in opac-ratings-ajax.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal 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 This script certainly needs a better authentication check but it is less trivial than the others. The block with Koha::Ratings calls should be within a check on loggedinuser. The whole script is a weird mix between an ajax script and a regular one. This statement will crash on an undefined borrowernumber (SQL constraint): Koha::Rating->new( { biblionumber => $biblionumber, borrowernumber => $loggedinuser, rating_value => $rating_value, })->store; -- 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=29939 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Do we know if this feature is even used ? Looks like a very old pre-social-network feature. In HEA we see preference is enabled, but it is by default. -- 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=29939 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If I am correct that these are the star ratings, there has been additions in the last versions to it which I think shows it must be used. -- 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=29939 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29939 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 139171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139171&action=edit Bug 29939: Use the REST API for ratings This patch replaces opac-ratings-ajax.pl with a new REST API route POST /public/biblios/42/ratings Note that we could go further and refactor the 'start_rating' select code. Test plan: Test the "star ratings" feature at the OPAC, on the different page where it's displayed. -- 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=29939 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Summary|Improve auth check in |Replace |opac-ratings-ajax.pl |opac-ratings-ajax.pl with a | |new REST API route -- 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=29939 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Stealing this bug, but you may consider it needs its own bug. Let me know and I will move the patch somewhere else. -- 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=29939 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=29939 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139171|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 139412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139412&action=edit Bug 29939: Use the REST API for ratings This patch replaces opac-ratings-ajax.pl with a new REST API route POST /public/biblios/42/ratings Note that we could go further and refactor the 'start_rating' select code. Test plan: Test the "star ratings" feature at the OPAC, on the different page where it's displayed. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139412|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 139559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139559&action=edit Bug 29939: Use the REST API for ratings This patch replaces opac-ratings-ajax.pl with a new REST API route POST /public/biblios/42/ratings Note that we could go further and refactor the 'start_rating' select code. Test plan: Test the "star ratings" feature at the OPAC, on the different page where it's displayed. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED CC| |lucas@bywatersolutions.com --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be in 22.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org