Koha/koha-tmpl/opac-tmpl/bootstrap
Mark Hofstetter 4e7b570fdb
Bug 20207: Don't show anyones's suggestions when OPACViewOthersSuggestions is deactivated
When you enable AnonSuggestions and ALLOW patrons that aren't logged
in to make purchase suggestions, once a suggestion has successfully
been submitted, anonymous purchase suggestions will show on OPAC even
when system preference OPACViewOthersSuggestions, is set to Don't show.

The suggestions will show on opac-suggestions.pl. However, if you search
for the title you suggested, you will get a message saying
"You are not authorized to see pending purchase suggestions."

This patch fixes the error, ie if OPACViewOthersSuggestions is set to
false not other suggestions are shown (if you are not logged in and AnonSuggestions)
OR ONLY your own suggestions if you are logged in

To test:
1) activate AnonSuggestions
2) create an anon suggestion
3) create a suggestion with a logged in user
4) toggle OPACViewOthersSuggestions Show/Don't show
5) all suggestions are shown cgi-bin/koha/opac-suggestions.pl in either case
6) apply patch
7) OPACViewOthersSuggestions is now respected ie suggestions from other users are only shown if activated
8) Please sign off

Sponsored-by: Library of the Natural History Museum Vienna

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 09:21:14 -03:00
..
css Bug 14783: Compiled CSS 2022-10-17 15:46:39 -03:00
en Bug 20207: Don't show anyones's suggestions when OPACViewOthersSuggestions is deactivated 2022-11-14 09:21:14 -03:00
images Bug 29036: (follow-up) Improve the use of variables to keep colors consistent 2021-12-01 21:38:12 -10:00
itemtypeimg Bug 27523: (follow-up) Add copy of image to carredart in the OPAC 2021-08-18 16:28:25 +02:00
js Bug 14783: (follow-up) Move pickup library form into modal 2022-10-17 15:27:00 -03:00
lib Bug 30859: Upgrade jQuery Validation plugin from v1.19.1 to v1.19.4 2022-07-01 16:41:30 -03:00