[Bug 24327] New: anonymous suggestions should not be allowed if AnonymousPatron misconfigured
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Bug ID: 24327 Summary: anonymous suggestions should not be allowed if AnonymousPatron misconfigured Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: OPAC Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org If anonymous suggestions (AnonSuggestions) are allowed but AnonymousPatron is not set correctly, it's possible to create a suggestion without being logged in and the app explodes with a FK constraint: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`suggestions`, CONSTRAINT `suggestions_ibfk_suggestedby` FOREIGN KEY (`suggestedby`) REFERENCES `bo rrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE) [for Statement "INSERT INTO `suggestions` ( `STATUS`, `author`, `branchcode`, `collectiontitle`, `copyrightdate`, `isbn`, `itemtype`, `note`, `pa tronreason`, `place`, `publishercode`, `quantity`, `suggestedby`, `suggesteddate`, `title`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="ASKED", 1="", 2=undef, 3="", 4=undef, 5="" , 6="AUDIOBOOK", 7="", 8="", 9="", 10="", 11=undef, 12="0", 13='2020-01-02T10:28:40', 14="xxx"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88 Exception::Class::Base::throw('Koha::Exceptions::Object::FKConstraint', 'error', 'Broken FK constraint', 'broken_fk', 'suggestedby') called at /kohadevbox/koha/Koha/Object.pm line 164 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24244 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96730&action=edit Bug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron This patch adds a warning to the about page if AnonSuggestions is set but AnonymousPatron. Test plan: Turn on AnonSuggestions and set AnonymousPatron to 0 => You see a warning on the about page Turn on AnonSuggestions and set AnonymousPatron to an invalid value => You see a warning on the about page Turn off AnonSuggestions => No warning Turn on AnonSuggestions and set AnonymousPatron to a valid value => No warning -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96731 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96731&action=edit Bug 24327: Redirect to the login form if AnonSuggestion misconfigured Test plan: Turn on AnonSuggestion but set AnonymousPatron to an invalid value Go to /cgi-bin/koha/opac-suggestions.pl?op=add => You see the login form -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|anonymous suggestions |Anonymous suggestions |should not be allowed if |should not be allowed if |AnonymousPatron |AnonymousPatron |misconfigured |misconfigured CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96730|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96746&action=edit Bug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron This patch adds a warning to the about page if AnonSuggestions is set but AnonymousPatron. Test plan: Turn on AnonSuggestions and set AnonymousPatron to 0 => You see a warning on the about page Turn on AnonSuggestions and set AnonymousPatron to an invalid value => You see a warning on the about page Turn off AnonSuggestions => No warning Turn on AnonSuggestions and set AnonymousPatron to a valid value => No warning Signed-off-by: hc <hc@interleaf.ie> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96731|0 |1 is obsolete| | --- Comment #4 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 96747 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96747&action=edit Bug 24327: Redirect to the login form if AnonSuggestion misconfigured Test plan: Turn on AnonSuggestion but set AnonymousPatron to an invalid value Go to /cgi-bin/koha/opac-suggestions.pl?op=add => You see the login form Signed-off-by: hc <hc@interleaf.ie> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Holly <hc@interleaf.ie> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |hc@interleaf.ie --- Comment #5 from Holly <hc@interleaf.ie> --- Both test plans were successful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 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=24327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96746|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 96772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96772&action=edit Bug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron This patch adds a warning to the about page if AnonSuggestions is set but AnonymousPatron. Test plan: Turn on AnonSuggestions and set AnonymousPatron to 0 => You see a warning on the about page Turn on AnonSuggestions and set AnonymousPatron to an invalid value => You see a warning on the about page Turn off AnonSuggestions => No warning Turn on AnonSuggestions and set AnonymousPatron to a valid value => No warning Signed-off-by: hc <hc@interleaf.ie> 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=24327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96747|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 96773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96773&action=edit Bug 24327: Redirect to the login form if AnonSuggestion misconfigured Test plan: Turn on AnonSuggestion but set AnonymousPatron to an invalid value Go to /cgi-bin/koha/opac-suggestions.pl?op=add => You see the login form Signed-off-by: hc <hc@interleaf.ie> 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=24327 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Holly, at the moment your sign off line shows "hc" as the name, which will turn up in the Release notes - would you like us to change it so it shows your full name instead? Signed-off-by: hc <hc@interleaf.ie> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 --- Comment #9 from Holly <hc@interleaf.ie> --- Hi Katrin, That would be great. I'll sign in full in the future, hc is just a habit. Thanks, Holly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.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=24327 --- Comment #10 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=24327 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.02 released in| | --- Comment #11 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24327 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- cant clean apply this patchset to the 19.05.x branch, if needed please rebase -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org