Koha-clms/C4
Jonathan Druart efc9c0adde Bug 9942: Make Koha fail if privacy is not respected
If a patron has requested anonymity on returning items and the system is
not correctly configured (AnonymousPatron no set or set to an inexistent
patron), the application should take it into account and not fail
quietly.

This patch is quite radical: the script will die loudly if the privacy
is not respected.

To be care of the bad "Software error", some checks are done in the
updatedatabase to be sure the admin will be warned is something is wrong
in the configuration.

Test plan:
1/ Test the updatedatabase entry:
a. Turn on OPACPrivacy and set AnonymousPatron to an existing patron
=> You will get a warning
b. Turn on OPACPrivacy and set AnonymousPatron to 0 or ''
=> You will get a warning
c. Turn on OPACPrivacy and set the privacy to 2 (Never) for at least 1 patron
Turn off OPACPrivacy
=> You will get a warning
d. In all other cases you will get no error

2/ Test the interface
a. Turn on OPACPrivacy and set the privacy to 2 (Never) for a patron
b. Now you can turn off OPACPrivacy or keep it on, behavior should be
the same
c. check an item out the patron
d. Check the item in using the check out table
=> fail
e. Check the item in using the Check in tab
=> fail (not gracefully).

Note that the software error could appear on other pages too.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Updatedatabase works as described
On staff, if don't have correct settings for anonymity it's
impossible to check-in (with OPACPrivacy on)
No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 94315f663b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
2015-07-16 10:08:42 +00:00
..
AuthoritiesMarc Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Barcodes Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Bookseller Bug 10402 follow-up: choose contacts for claims 2014-08-26 11:45:59 -03:00
ClassSortRoutine Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Creators Bug 12911: batch_id for new labels batches can be asssigned to several batches 2015-05-18 09:55:48 +12:00
External Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Form Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Heading Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ILSDI Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Installer Bug 8686: Raise required version of URI::Escape to 3.31 2015-07-05 02:08:25 +00:00
Labels Bug 10773 - Add item-level descriptions for Label Printing 2015-03-31 18:21:20 +13:00
Linker Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Members Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
OAI Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Output Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Patroncards Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Reports Bug 10976: Fix typo itemtype vs itemtypes 2015-05-17 18:36:27 +12:00
SIP Bug 7904 Change SIP modules to use standard LIB path 2015-05-21 10:24:02 +12:00
Search Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Serials Bug 7688: (follow-up) update license statements 2013-10-30 02:56:32 +00:00
Utils Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm 2015-06-16 10:21:23 +12:00
VirtualShelves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Accounts.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Acquisition.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Auth.pm Bug 14313: OPAC - Adding a comment makes result browser disappear 2015-07-06 10:02:18 +12:00
Auth_cas_servers.yaml.orig Bug 5630 CAS improvements 2011-10-13 10:49:49 +13:00
Auth_with_cas.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Auth_with_ldap.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Auth_with_shibboleth.pm BUG8446, QA Followup: Use DBIx::Class 2014-10-16 12:28:01 -03:00
AuthoritiesMarc.pm Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc 2015-05-17 18:44:48 +12:00
BackgroundJob.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Barcodes.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Biblio.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Bookseller.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Boolean.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Branch.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
Breeding.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Budgets.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Calendar.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
Category.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Charset.pm Bug 11790: Remove dependency C4::Context from C4::Charset 2015-06-16 10:15:19 +12:00
Circulation.pm Bug 9942: Make Koha fail if privacy is not respected 2015-07-16 10:08:42 +00:00
ClassSortRoutine.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ClassSource.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Context.pm Bug 14425: Typo in C4::Context IsSuperLibrarian perldoc 2015-07-05 02:26:10 +00:00
Contract.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
CourseReserves.pm Bug 14184: Undefined $term causes noisy warns in C4/CourseReserves.pm 2015-06-08 10:25:03 +12:00
Creators.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Csv.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Dates.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Debug.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
HTML5Media.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Heading.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
HoldsQueue.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Images.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ImportBatch.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ImportExportFramework.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Input.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
InstallAuth.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Installer.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ItemCirculationAlertPreference.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ItemType.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Items.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Koha.pm Increment version for 3.18.8 release 2015-06-23 13:41:01 +12:00
Labels.pm Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Languages.pm Bug 12616: Locale in subscriptions not preselecting correctly 2015-07-16 09:52:36 +00:00
Letters.pm Bug 14206: Adds delete function for non email templates 2015-06-16 13:33:45 +12:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Log.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
MarcModificationTemplates.pm Bug 11413: Fix field_numbers 2014-11-14 12:05:47 -03:00
Matcher.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Members.pm Bug 14016: Restore correct date format on issue date (00:00 vs 23:59) 2015-05-12 09:40:36 +12:00
Message.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
NewsChannels.pm Bug 12507 - News does not always display in staff or OPAC 2014-08-24 12:37:06 -03:00
Output.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Overdues.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Patroncards.pm Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Print.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Ratings.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Record.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Reports.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Reserves.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Review.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Ris.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
RotatingCollections.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
SMS.pm Bug 14421: Corrected example in SMS.pm to working version with hashref. 2015-07-05 02:26:47 +00:00
SQLHelper.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Scheduler.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Scrubber.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Search.pm Bug 13516: Display issue for search results with items both checkout out and lost 2015-05-17 18:51:41 +12:00
Serials.pm Bug 13423: Remove unused serials-recieve 2015-05-18 11:13:09 +12:00
Service.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
ShelfBrowser.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
SocialData.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
Stats.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Suggestions.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
TTParser.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Tags.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
Templates.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:58 +12:00
TmplToken.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
TmplTokenType.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
UploadedFile.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
UsageStats.pm Bug 11926: Follow-up - remove SearchEngine pref / fix POD 2014-10-22 15:17:14 -03:00
VirtualShelves.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
XISBN.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
XSLT.pm Bug 12655 [Revised] PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT 2014-10-30 09:35:12 +13:00