Koha/opac
Jonathan Druart be35039b55 Bug 4137: Fix the OPACViewOthersSuggestions behavior
This pref does not work at all, the interface let the user choose to
list all suggestions, but whatever he chooses the suggestion list is the
same.

This patch cleans a bit the suggestedby management.

There are a lot of cases to test, because linked to 2 prefs:
 AnonSuggestions and OPACViewOthersSuggestions.
1/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 0
  - A non logged in user is not able to make a suggestion.
  - A logged in user is not able to see suggestions made by someone else.
2/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 1
  - A non logged in user is not able to make a suggestion.
  - A logged in user is able to see suggestions made by someone else.
3/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 0
  - A non logged in user is able to make a suggestion.
  The suggestedby field will be filled with the AnonymousPatron pref value.
  He is not able to see suggestions, even the ones made by AnonymousPatron.
  - A logged in user is not able to see suggestions made by someone else.
4/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 1
  - A non logged in user is able to make a suggestion.
  He is able to see all suggestions.
  - A logged in user is able to see suggestions made by someone else.

In all cases a logged in user should be able to search for suggestions
(except if he is not able to see them).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All use cases tested, work as expected
No errors

Only comment is perhaps (in the future) a gracefull failure
when AnonymousPatron is not set, or has '0' value

Message is DBIx::Class::ResultSet::create(): Column 'suggestedby' cannot be null at ...

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-19 11:34:27 -03:00
..
errors Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
rss adding file just for creating the rss directory 2007-08-02 08:50:43 +00:00
sco Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
svc Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
ilsdi.pl Revert "Bug 6679: Fixing code so it passes basic Perl:::Critic tests" 2015-05-26 14:16:31 -03:00
maintenance.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
oai.pl Bug 10824: OAI-PMH repository/server not handling time in 'until' and 'from' 2015-06-05 12:53:10 -03:00
opac-account.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-addbybiblionumber.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-alert-subscribe.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-authorities-home.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-authoritiesdetail.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-basket.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-blocked.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
opac-browser.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-changelanguage.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-course-details.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-course-reserves.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-detail.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-discharge.pl Bug 14280: Add branches fields to discharges letters 2015-06-11 13:12:32 -03:00
opac-downloadcart.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-downloadshelf.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-export.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-ics.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-idref.pl Bug 8992: Interfacing with the Idref webservice 2015-04-28 15:46:26 -03:00
opac-image.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-imageviewer.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-ISBDdetail.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-main.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-MARCdetail.pl Bug 10938: Item columns displayed in random order - OPAC 2015-06-05 14:13:39 -03:00
opac-memberentry.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-messaging.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-modrequest-suspend.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-modrequest.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-mymessages.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-news-rss.pl Bug 7843: (QA followup) Make news selection persistant 2015-04-30 16:33:21 -03:00
opac-overdrive-search.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
opac-passwd.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-patron-image.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-privacy.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-ratings-ajax.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-ratings.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-readingrecord.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-registration-verify.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-renew.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-reserve.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
opac-review.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-search-history.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-search.pl Bug 14351: Remove given-when from opac-search.pl 2015-06-17 09:53:47 -03:00
opac-sendbasket.pl Bug 14330: Remove unused email_sender from sendbasket/sendshelf 2015-06-08 10:38:08 -03:00
opac-sendshelf.pl Bug 14330: Remove unused email_sender from sendbasket/sendshelf 2015-06-08 10:38:08 -03:00
opac-serial-issues.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-shareshelf.pl Bug 5010: Fix OPACBaseURL to include protocol 2015-06-04 10:00:04 -03:00
opac-shelves.pl Bug 13986: Implement fix for OPAC 2015-05-15 16:01:47 -03:00
opac-showmarc.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
opac-showreviews.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-suggestions.pl Bug 4137: Fix the OPACViewOthersSuggestions behavior 2015-06-19 11:34:27 -03:00
opac-tags.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-tags_subject.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-topissues.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac-user.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
tracklinks.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
unapi Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00