Koha/C4
Jonathan Druart 94315f663b Bug 9942: Make Koha fails 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>
2015-07-07 14:52:32 -03:00
..
AuthoritiesMarc Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Barcodes Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03: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-20 09:59:38 -03:00
Creators Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
External Bug 13758: Correct KOHA::VERSION in OverDrive.pm 2015-05-11 09:36:07 -03:00
Form Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Heading Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
ILSDI Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Installer Bug 8686: Raise required version of URI::Escape to 3.31 2015-06-18 12:18:33 -03:00
Labels Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Linker Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Members Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
OAI Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Output Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Patroncards Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Reports Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Search Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Serials Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
SIP Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Utils Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
VirtualShelves Bug 13986: Printing a list only prints the results of the page you are viewing 2015-05-15 16:01:33 -03:00
Accounts.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Acquisition.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Auth.pm Bug 14439: Typo in Bug 14408 regexp 2015-06-24 10:53:25 -03: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-20 09:59:38 -03:00
Auth_with_ldap.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Auth_with_shibboleth.pm Bug 5010: Fix OPACBaseURL to include protocol 2015-06-04 10:00:04 -03:00
AuthoritiesMarc.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
BackgroundJob.pm Bug 13606 Clear job data in session when the job is completed 2015-04-23 13:18:48 -03:00
Barcodes.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Biblio.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Bookseller.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Boolean.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Branch.pm Bug 14383: (QA followup) missing POD fix in C4/Branch.pm 2015-06-22 17:43:21 -03:00
Breeding.pm Bug 13987: Fix server name in z39.50 authority search results 2015-04-22 14:39:00 -03:00
Budgets.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Calendar.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Category.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Charset.pm Bug 11790: Remove dependency C4::Context from C4::Charset 2015-06-08 10:36:11 -03:00
Circulation.pm Bug 9942: Make Koha fails if privacy is not respected 2015-07-07 14:52:32 -03:00
ClassSortRoutine.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
ClassSource.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Context.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Contract.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
CourseReserves.pm Bug 14184: Undefined $term causes noisy warns in C4/CourseReserves.pm 2015-05-26 10:42:05 -03:00
Creators.pm Bug 14059: Delete all export of get_column_names 2015-05-22 17:02:21 -03:00
Csv.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Dates.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Debug.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Heading.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
HoldsQueue.pm Bug 14142 - Holds queue viewer only displays first subtitle from marc keyword mappings 2015-06-04 11:14:58 -03:00
HTML5Media.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Images.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
ImportBatch.pm Bug 12412: Add ability for plugins to convert arbitrary files to MARC from record staging tool 2015-05-04 15:33:51 -03:00
ImportExportFramework.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Input.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
InstallAuth.pm Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
Installer.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
ItemCirculationAlertPreference.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Items.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
ItemType.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Koha.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03: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-06-22 11:52:35 -03:00
Letters.pm Bug 14206: Adds delete function for non email templates 2015-06-11 10:14:22 -03:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Log.pm Bug 13889: (QA followup) Supress warning, set object column to undef instead of 0 2015-05-04 11:12:49 -03: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-20 09:59:38 -03:00
Members.pm Bug 10063: Remove outdated FIXME 2015-06-22 11:09:19 -03:00
Message.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03: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-20 09:59:38 -03:00
Overdues.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03: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-20 09:59:38 -03:00
Ratings.pm Bug 14383: Fix POD error in C4/Ratings.pm 2015-06-22 17:34:47 -03:00
Record.pm Revert "Bug 6679: Fix 3 perlcritic violations in C4/Record.pm" 2015-05-26 14:16:06 -03:00
Reports.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Reserves.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Review.pm Bug 13969: Replace calls to $sth->fetchrow* with a call to $dbh->selectrow* and Cleaning files 2015-05-14 11:11:41 -03:00
Ris.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
RotatingCollections.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Scheduler.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Scrubber.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Search.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Serials.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Service.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
ShelfBrowser.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
SMS.pm Bug 14421: Corrected example in SMS.pm to working version with hashref. 2015-06-22 11:08:29 -03:00
SocialData.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Stats.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Suggestions.pm Bug 13014: Notify budget owner on new suggestion - UT 2015-06-24 11:39:40 -03:00
Tags.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Templates.pm Bug 14120: Fixing t/db_dependent/Auth.t noise 2015-06-01 14:09:22 -03:00
TmplToken.pm Revert "Bug 6679: (follow-up) fix 9 perlcritic violations in C4/TmplTokenType.pm" 2015-05-26 14:16:21 -03:00
TmplTokenType.pm Revert "Bug 6679: Fix 9 perlcritic violations in C4/TmplTokenType.pm" 2015-05-26 14:16:58 -03:00
TTParser.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
UploadedFile.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
UsageStats.pm Bug 7981: Remove HomeOrHoldingBranchReturn syspref from C4::UsageStats 2015-06-11 10:41:27 -03:00
VirtualShelves.pm Bug 13421: (QA followup) Change creation_time to created_on 2015-05-04 12:31:59 -03:00
XISBN.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
XSLT.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00