working/Evergreen.git
9 years agoLP#1468422 Always default to root org unit collab/berick/lp1468422-passwd-storage
Bill Erickson [Mon, 1 Feb 2016 15:15:23 +0000 (10:15 -0500)]
LP#1468422 Always default to root org unit

If no org unit is passed by the caller, always default to the root org
unit.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoLP#1468422 Use auth_internal.validate to shore up AuthProxy
Dan Wells [Tue, 26 Jan 2016 19:22:21 +0000 (14:22 -0500)]
LP#1468422 Use auth_internal.validate to shore up AuthProxy

Even if a user has valid credentials in the external system, we should
block them from logging in if their Evergreen account is out of sorts.
Use the API designed for this.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
9 years agoLP#1468422 "Aut" to "Auth" typo fix
Dan Wells [Tue, 26 Jan 2016 18:36:14 +0000 (13:36 -0500)]
LP#1468422 "Aut" to "Auth" typo fix

Just cosmetic for now, but potentially for future sanity protection.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
9 years agoLP#1468422 Auth efficiency improvements
Bill Erickson [Wed, 27 Jan 2016 17:11:33 +0000 (12:11 -0500)]
LP#1468422 Auth efficiency improvements

1. Adds an oils_utils function for retrieving the ID of the root org
unit.

2. Avoid multiple cstore/db lookups for the root org unit by caching the
ID at the process level.

3. Move permission checks from open-ils.storage to open-ils.cstore.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoLP#1468422 Login permission checks are global
Bill Erickson [Wed, 27 Jan 2016 16:46:17 +0000 (11:46 -0500)]
LP#1468422 Login permission checks are global

For backwards compat, perform all login permission checks using the root
org unit as the context org unit.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoLP#1468422 Return vanilla login failure on nonexistent username/barcode
Bill Erickson [Tue, 26 Jan 2016 19:16:06 +0000 (14:16 -0500)]
LP#1468422 Return vanilla login failure on nonexistent username/barcode

For backwards compatibility (and security), return the same login
failure for nonexistent usernames/barcodes as for bad passwords, etc.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoLP#1468422 Report inactive card on password OK
Bill Erickson [Mon, 11 Jan 2016 16:02:23 +0000 (11:02 -0500)]
LP#1468422 Report inactive card on password OK

Prevent leaking information from authentication by only reporting that a
card is inactive if the caller provided the correct credentials.  This
is consistent with how the code handles inactive patrons.

To avoid a lot of code duplication and to reduce the potential for
leaking memory (C code, amiright?), this commit includes a number of
changes to avoid exiting the API function early and saving the memory
cleanup routines until the end of the API call.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoLP#1468422 auth-internal validate API
Bill Erickson [Fri, 8 Jan 2016 20:06:14 +0000 (15:06 -0500)]
LP#1468422 auth-internal validate API

Adds a new open-ils.auth_internal API
open-ils.auth_internal.user.validate for checking whether a user should
be allowed to login.

It tests user existence, active=true, barred=false, deleted=false.

If a barcode is also provided, it confirms the barcode exists and is
active.

Modifies open-ils.auth.authenticate.complete to use the new API instead
of implementing the logic directly.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
9 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/lp1468422...
Bill Erickson [Fri, 8 Jan 2016 16:11:40 +0000 (11:11 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into collab/berick/lp1468422-passwd-storage

9 years agoLP 1519465: POs with spaces in the name cause EDI problems.
Jason Stephenson [Tue, 24 Nov 2015 18:57:33 +0000 (13:57 -0500)]
LP 1519465: POs with spaces in the name cause EDI problems.

This is a small modification to the regular expression for parsing
the id from the edi line item fields in EDIReader.pm that allows the
ids to parse correctly when the PO name contained a space or spaces
in it.  This change was suggesting by Bill Erickson (berick) in
http://irc.evergreen-ils.org/evergreen/2015-11-24#i_216736

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
9 years agoLP1522686: Force SSL for Web Staff, Add Basic Redirect for Staff URL
Jason Boyer [Fri, 4 Dec 2015 06:17:21 +0000 (01:17 -0500)]
LP1522686: Force SSL for Web Staff, Add Basic Redirect for Staff URL

1 minor change, 1 less minor change.

First, add a simple redirect for staff that forget to enter the
final '/' at the end of <server>/eg/staff/.

Second, and most importantly, force all connections to the web
staff client to be redirected through an HTTPS connection. By
default the system would accept whichever connection type you
enter by hand, and fewer and fewer people actually enter the
protocol specifier these days.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Ben Shum <bshum@biblio.org>
9 years agoLP#1530158: ensure that Business::OnlinePayment::PayflowPro is installed
Galen Charlton [Wed, 30 Dec 2015 16:00:26 +0000 (11:00 -0500)]
LP#1530158: ensure that Business::OnlinePayment::PayflowPro is installed

Business::OnlinePayment::PayflowPro is a Perl module required if
the user wants to use PayflowPro as a credit card processor; without
it, attempts to make payments in TPAC using that processor will fail
with an internal server error.

This patch ensures that the module will get installed on Debian,
Ubuntu, and Fedora.

Strictly speaking, the Perl module is strictly optional, as
Business::OnlinePayment uses lazy loading for its drivers, but this
patch is making the assumption that its easiest all around if
we just install all dependencies that an Evergreen application
server might need.

To test
-------
[1] Install or upgrade Evergreen, then run settings-tester.pl to
    verify that the module is installed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
9 years agoLP#1526543 Truthiness check for reset_password is flawed
Dan Wells [Thu, 13 Feb 2014 16:56:19 +0000 (11:56 -0500)]
LP#1526543 Truthiness check for reset_password is flawed

We expect boolean options in config.tt2 to be 'true' or 'false',
but the code was simple asking 'IF reset_password', which is true
for either value.

Instead, match on the string (as we do in other places).

To test:
- Load the stock catalog login page
- Notice the "Forgot your password?" link staying no matter which way
  'reset_password' is set in config.tt2
- Apply patch, and change 'reset_password' value in config.tt2 to 'false'
- RESULT: Password reset link doesn't show up

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
9 years agoLP#1468422 Make AuthProxy.pm work with new auth
Dan Wells [Tue, 5 Jan 2016 19:24:21 +0000 (14:24 -0500)]
LP#1468422 Make AuthProxy.pm work with new auth

Previously, AuthProxy.pm would simply lookup and use the hashed password
when the external authentication had passed.  This simple method no
longer works, since even cstore doesn't have access to the hashed
password.

Instead, take advantage of the new 'auth_internal' service to create the
user session after the user has been externally authenticated.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
9 years agoLP#1468422 Tighten AuthProxy argument requirements
Dan Wells [Tue, 5 Jan 2016 19:21:11 +0000 (14:21 -0500)]
LP#1468422 Tighten AuthProxy argument requirements

Basically, if we aren't given a username, and we can't find a username
by barcode, give up immediately.  This helps simplify the rest of the
code a bit.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
9 years agoFixing upgrade 0950 upgrade script
Kathy Lussier [Wed, 16 Dec 2015 14:27:40 +0000 (09:27 -0500)]
Fixing upgrade 0950 upgrade script

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
9 years agoLP#1319998 Stamping upgrade script
Kathy Lussier [Tue, 15 Dec 2015 19:21:12 +0000 (14:21 -0500)]
LP#1319998 Stamping upgrade script

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
9 years agoLP1319998_materialized_summary_billing_del_ADDS_to_balance_owed
blake [Thu, 19 Nov 2015 22:14:37 +0000 (16:14 -0600)]
LP1319998_materialized_summary_billing_del_ADDS_to_balance_owed

Switched the plus sign to a minus sign. This will keep the
materialized view correct when deleting rows from money.billing.

Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#1519925 - Allow MARC Federated Search to search UPC index of local catalog.
Josh Stompro [Wed, 25 Nov 2015 19:36:08 +0000 (13:36 -0600)]
LP#1519925 - Allow MARC Federated Search to search UPC index of local catalog.

If a organization added UPC search for certain Z39.50 servers then the UPC search box
would display in the MARC Federated Search interface, but the local catalog would
not be searched.  This adds the ability to search the local catalog "Evergreen Catalog"
UPC index from that interface.

Confirm the Issue:

1. To trigger the initial problem you need a Z39.50 server setup that includes a UPC
Search.  For OCLC the following Z39.50 attributes add UPC searching.
Name:upc, Label:UPC, Code:1007, Format:4, Truncation:0

2. Now the MARC Federated Search should include a UPC search option.  Try searching
for a UPC that exists in the local catalog.  Nothing should come up.

After patch applied:

1. Now if you search for a UPC in the MARC Federated Search that you know exists,
it will show up.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1468422 Remove deprecated open-ils.storage remote_update
Bill Erickson [Tue, 24 Nov 2015 17:18:16 +0000 (12:18 -0500)]
LP#1468422 Remove deprecated open-ils.storage remote_update

User update in Actor.pm was the only remaining code that leveraged
the open-ils.storage remote_update API.  With that code moving to
open-ils.cstore, save some RAM by no longer auto-loading/publishing
remote_update methods.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 SIP password verification
Bill Erickson [Tue, 24 Nov 2015 16:46:32 +0000 (11:46 -0500)]
LP#1468422 SIP password verification

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Implement password reset updates
Bill Erickson [Tue, 24 Nov 2015 16:31:06 +0000 (11:31 -0500)]
LP#1468422 Implement password reset updates

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Port user update to cstore
Bill Erickson [Tue, 24 Nov 2015 16:15:06 +0000 (11:15 -0500)]
LP#1468422 Port user update to cstore

Migrate the user update code from open-ils.storage to open-ils.cstore.
This has several benefits:

1. We can re-use the patron password update code
2. Several actions (bad contacts, invalid address) which previously
   resulted in data modifications outside the main transaction now
   take place with the main patron update transaction.
3. Bigger, better, faster, stronger.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Password verify and password update
Bill Erickson [Mon, 23 Nov 2015 22:13:48 +0000 (17:13 -0500)]
LP#1468422 Password verify and password update

These API's now support new-style passwords:

open-ils.actor.verify_user_password
open-ils.actor.user.password.update

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Admin seed data sets new-style passwd
Bill Erickson [Mon, 23 Nov 2015 18:56:36 +0000 (13:56 -0500)]
LP#1468422 Admin seed data sets new-style passwd

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Password storage release notes
Bill Erickson [Mon, 23 Nov 2015 18:22:37 +0000 (13:22 -0500)]
LP#1468422 Password storage release notes

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 SQL continued
Bill Erickson [Mon, 23 Nov 2015 17:51:50 +0000 (12:51 -0500)]
LP#1468422 SQL continued

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Admin seed data sets new-style passwd
Bill Erickson [Mon, 23 Nov 2015 17:51:31 +0000 (12:51 -0500)]
LP#1468422 Admin seed data sets new-style passwd

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 free barcode regex
Bill Erickson [Mon, 23 Nov 2015 16:25:12 +0000 (11:25 -0500)]
LP#1468422 free barcode regex

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 New open-ils.auth_internal service
Bill Erickson [Thu, 19 Nov 2015 20:00:20 +0000 (15:00 -0500)]
LP#1468422 New open-ils.auth_internal service

Service is responsible for adding user data to the authentication cache.
Cache times are determined from opensrf.xml/AOUS settings.  No
authentication checks are performed.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 SQL upgrade extractions..
Bill Erickson [Fri, 24 Jul 2015 15:27:01 +0000 (11:27 -0400)]
LP#1468422 SQL upgrade extractions..

Move test code to Pg/live_t (it assumes concerto).

Added pgcrypto to create_extensions file

Upgrade completes w/ a commit now

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Add libpcre to build for open-ils.auth
Bill Erickson [Fri, 24 Jul 2015 15:20:06 +0000 (11:20 -0400)]
LP#1468422 Add libpcre to build for open-ils.auth

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 API uses pcre instead of regex.h -- needs autoconf -lpcre update
Bill Erickson [Thu, 23 Jul 2015 21:40:34 +0000 (17:40 -0400)]
LP#1468422 API uses pcre instead of regex.h -- needs autoconf -lpcre update

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 API minor cleanup
Bill Erickson [Thu, 23 Jul 2015 19:03:34 +0000 (15:03 -0400)]
LP#1468422 API minor cleanup

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 API wrapped up; pending more tests
Bill Erickson [Thu, 23 Jul 2015 18:59:34 +0000 (14:59 -0400)]
LP#1468422 API wrapped up; pending more tests

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 db legacy password hashes w/ salt first
Bill Erickson [Thu, 23 Jul 2015 18:02:19 +0000 (14:02 -0400)]
LP#1468422 db legacy password hashes w/ salt first

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 auth API continued
Bill Erickson [Thu, 23 Jul 2015 17:51:29 +0000 (13:51 -0400)]
LP#1468422 auth API continued

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 auth API continued.
Bill Erickson [Thu, 23 Jul 2015 15:37:28 +0000 (11:37 -0400)]
LP#1468422 auth API continued.

Added .init.barcode and .init.username.  Modified .init to test barcode
regex.  Lightly tested.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 open-ils.auth API changes, in progress
Bill Erickson [Thu, 23 Jul 2015 15:23:35 +0000 (11:23 -0400)]
LP#1468422 open-ils.auth API changes, in progress

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 open-ils.auth API changes, in progress
Bill Erickson [Wed, 22 Jul 2015 22:02:19 +0000 (18:02 -0400)]
LP#1468422 open-ils.auth API changes, in progress

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 comment repairs
Bill Erickson [Wed, 22 Jul 2015 14:39:25 +0000 (10:39 -0400)]
LP#1468422 comment repairs

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 comment repairs
Bill Erickson [Wed, 22 Jul 2015 14:36:09 +0000 (10:36 -0400)]
LP#1468422 comment repairs

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 More comments, tests are now pgtap-driven.
Bill Erickson [Wed, 22 Jul 2015 14:32:55 +0000 (10:32 -0400)]
LP#1468422 More comments, tests are now pgtap-driven.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 storing more algo bits; big nod toward non-main passwords
Bill Erickson [Tue, 21 Jul 2015 22:05:36 +0000 (18:05 -0400)]
LP#1468422 storing more algo bits; big nod toward non-main passwords

Store the iter_count and start using the crypt_algo column.

Make it possible to change the salt, and potentially strengthen
the salt, when changing passwords.

Make is possible to start salt-less passwords, for pw's that are managed
outside of the DB.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Real-time / per-user password migration
Bill Erickson [Tue, 21 Jul 2015 16:45:51 +0000 (12:45 -0400)]
LP#1468422 Real-time / per-user password migration

Don't rely on mass password migration, since it would take a very long
time.  Instead, migrate users on demand.

Raise work factor (iteration count) from 10 to 14.

Current flow:

1. Application requests a salt to use as the CHAP-style seed
2. If new-style password exists, salt is returned.
3. Else, old password is migrated and the new salt is returned.
4. App finalizes login by checking verify_passwd.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1468422 Password storage/migration proof of concept
Bill Erickson [Fri, 17 Jul 2015 20:00:17 +0000 (16:00 -0400)]
LP#1468422 Password storage/migration proof of concept

* Backwards compatible salted password storage using pgcrypt
* Adds actor.passwd and actor.passwd_type tables
* Includes some inline tests along the bottom
* Completes with ROLLBACK (for now)

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoDocs: fix typo for version upgrade 2.8.4-2.9.0 in server upgrade
Ben Shum [Wed, 18 Nov 2015 21:38:11 +0000 (16:38 -0500)]
Docs: fix typo for version upgrade 2.8.4-2.9.0 in server upgrade

Oops, got a little ahead of myself, this is more accurate.

Thanks to 2.9 RM Jason Stephenson for noting my mistake.

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoDocs: Missed some acknowledgements in the 2.9.1 point release notes
Kathy Lussier [Wed, 18 Nov 2015 21:24:14 +0000 (16:24 -0500)]
Docs: Missed some acknowledgements in the 2.9.1 point release notes

Missed a few ackwnowledgements in the release notes. Apologies to those who
I missed. Also added bshum since he made a doc change after the release notes
were merged.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoDocs: Change references to release 2.9.1
Ben Shum [Wed, 18 Nov 2015 20:12:59 +0000 (15:12 -0500)]
Docs: Change references to release 2.9.1

In the server upgrade docs, change references so that we are talking
about major series 2.9 now and note the latest version which is 2.9.1.

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoDocs: Addition to 2.8.5 point release notes
Kathy Lussier [Wed, 18 Nov 2015 18:51:07 +0000 (13:51 -0500)]
Docs: Addition to 2.8.5 point release notes

Last-minute addition to 2.8.5 release notes for miker's query parser fix.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoDocs: 2.8.5 point release notes
Kathy Lussier [Tue, 17 Nov 2015 21:37:51 +0000 (16:37 -0500)]
Docs: 2.8.5 point release notes

Adding bug fixes and acknowledgements for the 2.8.5 point release.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoAdding bug fixes and acknowledgements to 2.9.1. Release Notes
Kathy Lussier [Wed, 18 Nov 2015 00:13:57 +0000 (19:13 -0500)]
Adding bug fixes and acknowledgements to 2.9.1. Release Notes

The structure of these point release notes is a little different from what
we did with the 2.8 series. I restructured the headings a bit so that there
is just the one level one header. The two headers in the 2.8 release notes
led to a confusing outline.

Also, I'm adding acknowledgements for each point release rather than adding the
entire batch at the bottom of the file. There are two reasons for this change:

1. The release notes in the official documentation are broken up into different
sections, whereas the ones on the downloads page are available all on one page.
In the official docs, it appeared as if everyone being acknowledged had
contributed to the .0 release, when, in actuality, some had contributed patches
in other point releases. By adding acknowledgements to every point release
section, it is clear who contributed to which release.

2. Consistent contributors get acknolwedgement for every point release they
contribute to, which is a nice thing to do.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#1516707: Phrase search ignores CD modifiers
Mike Rylander [Tue, 17 Nov 2015 22:20:05 +0000 (17:20 -0500)]
LP#1516707: Phrase search ignores CD modifiers

Because phrases are subqueries, we need to look at the top of the parse tree
when looking for modifiers for cover density.  This is because modifers are
normally only allowed at the top of the parse tree (or in the floating sub-
query).  We do that by asking the plan's QueryParse for it's reference to its
parse_tree member, which is always the top of the parse tree in QP.

Included in this commit is a small change to the QP testing script to
facilitate testing of this fix.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP1402018_Acq_Copy_location_UI_scoped_to_registered_workstation
blake [Mon, 5 Jan 2015 16:38:18 +0000 (10:38 -0600)]
LP1402018_Acq_Copy_location_UI_scoped_to_registered_workstation

This little patch will open up the acq copy location dropdown UI
to include other library's copy locations outside of the workstation
registration. When the user permissions are scoped to more branches.

Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoFix LP1175711, OPAC can't renew item on booking resource list
Steven Chan [Thu, 19 Sep 2013 19:51:35 +0000 (12:51 -0700)]
Fix LP1175711, OPAC can't renew item on booking resource list

A test sequence to show the behaviour before and after the fix:

1. Using staff client, check out an item to test account.
2. Go to Copy Details on the OPAC, click Book Now, and cancel the form;
the side effect is to put the item on the Resource list.
3. Using the OPAC on a web browser, log in with test account.
4. Go to Items Checked Out, select the item in the list and click Renew
Selected Items.

Before the fix, we saw the OPAC spin forever, and we saw the Javascript
console of the web browser log the error noted in previous comments.

With the fix, we see an error prompt saying, 'The system is unable to
renew the selected item at this time.  This usually means the item is
needed to fulfill a hold.  Please see a librarian for further help.'

Note: A patron with the normal group of permissions will not be able to
renew an item on resource list.

The fix is to check for an error object emitted by the function
Booking.pm/reservation_list_by_filters(), and to propagate it back to
the client, by returning a call to bail_on_events().

We also clarify the coding of the function's parameter list and how the
function checks for mandatory parameters.

Signed-off-by: Steven Chan <schan@sitka.bclibraries.ca>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP 1516786: 0938 Upgrade Script ends in END and not COMMIT.
Jason Stephenson [Mon, 16 Nov 2015 21:15:22 +0000 (16:15 -0500)]
LP 1516786: 0938 Upgrade Script ends in END and not COMMIT.

Change the END; on the last line of 0938.data.some_rda_attributes.sql
to COMMIT; for reasons of consistency and to avoid issues when wrapped
in larger upgrade scripts using the make release script.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1513554 - Stamping Upgrade Script
Jason Stephenson [Fri, 13 Nov 2015 21:12:46 +0000 (16:12 -0500)]
LP#1513554 - Stamping Upgrade Script

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1513554 - Doc update for cancel reason selection
Kathy Lussier [Sun, 8 Nov 2015 14:47:58 +0000 (09:47 -0500)]
LP#1513554 - Doc update for cancel reason selection

Adding an update to the docs to inform users that default cancel reasons
cannot be selected.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP#1513554 - Prevent deletion of reserved rows.
Chris Sharp [Thu, 5 Nov 2015 18:30:51 +0000 (13:30 -0500)]
LP#1513554 - Prevent deletion of reserved rows.

It was previously possible to delete reserved rows in
the acq.cancel_reasons table via the UI.  We take a belt
and suspenders approach here:

1) Grey out the checkboxes beside cancel reasons with an
   ID lower than 2000.
2) Create a trigger on the acq.cancel_reason table that
   prevents deletion of rows with an ID lower than 2000.

The trigger executes a new generally available function
for use in similar situations in the future.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoLP# 1483506 public.first_agg & public.first pgTAP tests
Yamil Suarez [Fri, 14 Aug 2015 19:39:58 +0000 (15:39 -0400)]
LP# 1483506 public.first_agg & public.first pgTAP tests

Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#1483500 - pgtap Test for evergreen.lowercase
Josh Stompro [Fri, 14 Aug 2015 18:19:49 +0000 (13:19 -0500)]
LP#1483500 - pgtap Test for evergreen.lowercase

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#1483508 PGTAP tests for text_concat / agg_text
Bill Erickson [Fri, 14 Aug 2015 15:17:55 +0000 (11:17 -0400)]
LP#1483508 PGTAP tests for text_concat / agg_text

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoUpdate core committer information on the staff client's About Page
Ben Shum [Thu, 5 Nov 2015 19:12:39 +0000 (14:12 -0500)]
Update core committer information on the staff client's About Page

Welcome Kathy Lussier as the newest core committer for the Evergreen Project.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agolp1486294: Add sample order record file to datasets
Kathy Lussier [Fri, 6 Nov 2015 15:43:41 +0000 (10:43 -0500)]
lp1486294: Add sample order record file to datasets

Adding a sample order record file to the datasets that can be used for test
uploads against the current acq test data.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1486294 ACQ sapmle holding subfield maps
Bill Erickson [Thu, 5 Nov 2015 18:56:15 +0000 (13:56 -0500)]
LP#1486294 ACQ sapmle holding subfield maps

Collection of holding subfield map configurations for ACQ seed data
providers.  Maps for all providers are the same.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#1486294 ACQ sample data
Bill Erickson [Wed, 4 Nov 2015 22:00:07 +0000 (17:00 -0500)]
LP#1486294 ACQ sample data

Sample ACQ data including:

* funding sources
* funds
* funding source credits
* fund allocations
* providers
* purchase orders
* lineitems (some canceled)
* lineitem details (copies, some canceled)
* fund_debits

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
10 years agoLP#937789: Stamping upgrade script for part deletion
Ben Shum [Thu, 5 Nov 2015 23:12:35 +0000 (18:12 -0500)]
LP#937789: Stamping upgrade script for part deletion

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#937789: Hide 'deleted' from parts table & editor
Remington Steed [Thu, 5 Nov 2015 13:45:23 +0000 (08:45 -0500)]
LP#937789: Hide 'deleted' from parts table & editor

This commit hides the new parts 'deleted' field from the Manage Parts
dojo table and popup editor.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#937789: various improvements to logical deletion of parts
Galen Charlton [Thu, 29 Oct 2015 15:39:16 +0000 (15:39 +0000)]
LP#937789: various improvements to logical deletion of parts

This patch ensures that when a monograph part is marked as
deleted, that mappings between it and its copies are also
removed, similar to the previous behavior of the cascade
on delete.

This patch also adds some pgTAP tests and ensures that
unapi.bmp() and unapi.holdings_xml() get updated during upgrade.

To test the fix for this bug:

[1] Apply the patches.
[2] Create a monograph part on a record, then delete it. Verify that
    it no longer shows up in the parts maintenance interface, but that
    a row in the biblio.monograph_parts table still exists with the
    deleted flag set to true.
[3] Create another monograph part on the same record.
[4] Create a new volume/copy and assign the part created in step
    3 to it. Verify that the part shown in step 2 is *not*
    included in the XUL part selector.
[5] Place a part-level hold. Verify that the hold request
    is displayed correct in both the public catalog and the staff
    interface.
[6] Delete the part created in step 3.
[7] Verify that viewing the list of the patron's holds in the XUL staff
    client doesn't result in any 'network errors'.  Also verify that
    the hold request is still displayed in patron's view in the public
    catalog.
[8] Using SQL or some other means, set the expire_time and
    prev_check_time of the test hold request to a couple days in the
    past, then run the hold targeter.  Verify that the hold gets
    cancelled for lack of a suitable copy to fill it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#937789: fake-delete support for monograph parts
Mike Rylander [Thu, 7 Jun 2012 18:54:24 +0000 (14:54 -0400)]
LP#937789: fake-delete support for monograph parts

Unlike copies, call numbers, and bibs, parts can be directly removed from the
database.  This has a negative impact on holds, in that the holds become not
just orphaned, but broken entirely.  With this commit we bring part holds to
parity with other hold types such that they can be system-canceled when their
target goes away.  This will avoid spurious UI-level errors to staff.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoDocs: add 'Place another hold link' docs
Kate Butler [Thu, 5 Nov 2015 21:21:37 +0000 (16:21 -0500)]
Docs: add 'Place another hold link' docs

Signed-off-by: Yamil Suarez <yamil@yamil.com>
10 years agoLP#1092018: Make the reports UI use UTF-8.
Pasi Kallinen [Thu, 4 Jul 2013 05:33:25 +0000 (08:33 +0300)]
LP#1092018: Make the reports UI use UTF-8.

To test:

[1] Install the translation for a language that uses
    non-Latin-1 characters, such as Russian.
[2] Start the XUL staff client and open the reports
    interface.  Note that labels are mangled.
[3] Apply the Apache configuration changes in this patch,
    reload Apache, clear cache in the staff client, and
    reload the reports UI. The labels should now be
    displayed correctly.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1487527: turn consortium-wide search scope on by default
Kathy Lussier [Thu, 5 Nov 2015 18:06:41 +0000 (13:06 -0500)]
LP#1487527: turn consortium-wide search scope on by default

Turn the consortium-wide search scope features on by default. Release Notes
have been updated accordingly.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1487527: Release Notes and disable toggles by default
Thomas Berezansky [Wed, 4 Nov 2015 21:15:24 +0000 (16:15 -0500)]
LP#1487527: Release Notes and disable toggles by default

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1487527: Add config.tt2 options and a basic search button
Thomas Berezansky [Thu, 29 Oct 2015 16:08:48 +0000 (12:08 -0400)]
LP#1487527: Add config.tt2 options and a basic search button

Also adding an optional results page hint

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1487527: Search Results checkbox for "Set Depth to Zero"
Thomas Berezansky [Tue, 27 Oct 2015 17:13:27 +0000 (13:13 -0400)]
LP#1487527: Search Results checkbox for "Set Depth to Zero"

Intended for "expand my search" while remaining as focused on the original
search location as possible.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1511828: sort proximities numerically when targeting holds
Josh Stompro [Sat, 31 Oct 2015 15:38:41 +0000 (10:38 -0500)]
LP#1511828: sort proximities numerically when targeting holds

The hold targeter had three instances of using lexical sorting
rather than numerical sorting.

Two of the instances affected hold targeting if proximity values were
over 9.  Proximity values were being sorted lexically. For instance,
1,2,5,11,15,100,120 was sorted as 1,100,11,120,15,2,5, causing
interesting hold targeting results. Normally proximity doesn't go
that high so it isn't a problem, but we were using proximity adjustments
to strictly order locations so each location had a different proximity,
driving the numbers above 9.

One instance wasn't causing any current issue but could cause problems in
the future if more best hold selection sort options are added to bring the
total number of sort options over 9.

Also included are some changes to reduce warnings in the logs
suggested by Bill Erickson.  The sorting problem was found by
Galen Charlton, thanks Galen.

Testing Notes - to trigger this issue you need to have adjusted
  proximities over 9.

1. Use proximity adjustment rules to add a +10 proximity adjustment to
  one item circ lib, Branch A and a +2 proximity adjustment to the
  item circ lib Branch B.

2. Find a title with a copy at Branch A and B. Place a hold with a
  pickup location of Branch B.

3. The copy at Branch A should get targeted since it has a proximity of
  12-14 (10+normal proximity) and Branch B has a proximity of 2
  (2+normal proximity).  12 gets sorted before 2 lexically.

4. After the fix the copy at Branch B should get targeted since 2
  is sorted before 12.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1400801 - Updated email validation regex for Org Unit admin gui
Josh Stompro [Thu, 11 Jun 2015 01:12:10 +0000 (20:12 -0500)]
LP#1400801 - Updated email validation regex for Org Unit admin gui

Grabbed the example of a simplified RFC 5322 email regex from
http://www.regular-expressions.info/email.html and lightly modified it
for case sensitivity and removed the "&" character from the localpart allowed
characters, which causes a 500 server error for some reason.

This matches many more of the valid localpart special characters.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1164174: add release notes
Galen Charlton [Thu, 5 Nov 2015 18:25:25 +0000 (18:25 +0000)]
LP#1164174: add release notes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1164174: have authority linker handle author/title series added entries
Mark Cooper [Wed, 3 Apr 2013 21:23:56 +0000 (14:23 -0700)]
LP#1164174: have authority linker handle author/title series added entries

Support for 800 field author/title series added entry is
missing from authority_control_fields.pl. This adds it.

Subfields match:
http://www.loc.gov/marc/bibliographic/bd800.html
Example bib link:
=800 1\$aTolkien, J. R. R.$q(John Ronald Reuel),$d1892-1973.
$tLord of the rings (1986) ;$vpt. 1.$0(DLC)7

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1464765: stamp upgrade script
Galen Charlton [Thu, 5 Nov 2015 15:44:43 +0000 (15:44 +0000)]
LP#1464765: stamp upgrade script

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1464765: (follow-up) remove unneeded bits from schema upgrade
Galen Charlton [Thu, 5 Nov 2015 15:42:03 +0000 (15:42 +0000)]
LP#1464765: (follow-up) remove unneeded bits from schema upgrade

The patch for bug 1155313 already corrected the data,
so no need to do it again.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP1464765: Speed Up Number Padding for Sort Keys
Jason Boyer [Tue, 30 Jun 2015 12:53:21 +0000 (08:53 -0400)]
LP1464765: Speed Up Number Padding for Sort Keys

[New commit message by Galen Charlton:]
This patch was originally written to fix a problem with
normalization of various labels, but the patches for
bug 1155313 fixed the function problem.  However, testing
shows that this version of evergreen.lpad_number_substrings()
is about a third faster, so this patch is being merged to
get the speed improvement and the additional tests.

Thanks to Thomas Berezansky for a much simplified approach.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1406387 Fix for Holds Placement Advanced Options
Adam Bowling [Mon, 19 Jan 2015 17:05:19 +0000 (12:05 -0500)]
LP#1406387 Fix for Holds Placement Advanced Options

In the staff client, when placing a hold and clicking
Advanced Hold Options, the barcode input will populate
with the staff member's barcode if it was previously
empty, regardless of whether the radio input for the
hold was specified for a patron or the staff member.

This patch corrects that behavior, and also populates
the input radio on load after clicking Advanced Hold
Options.

Signed-off-by: Adam Bowling <abowling@emeralddata>
Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1501471: Stamping SQL update
Bill Erickson [Thu, 5 Nov 2015 14:27:51 +0000 (09:27 -0500)]
LP#1501471: Stamping SQL update

Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1501471: add some unit tests for batch OU retrieval
Galen Charlton [Wed, 4 Nov 2015 21:27:14 +0000 (21:27 +0000)]
LP#1501471: add some unit tests for batch OU retrieval

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1501471: add DB function for batch retrieval of OU settings
Galen Charlton [Wed, 30 Sep 2015 22:11:55 +0000 (22:11 +0000)]
LP#1501471: add DB function for batch retrieval of OU settings

This adds a new stored function and a utility routine that uses it
for retrieving a set of OU settings in one fell swoop.  This offers
a significant speed boost for the Dojo patron editor, which loads
about 70 OU settings when it initalizes itself.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1501471: check OU setting view_perms only when needed
Galen Charlton [Wed, 30 Sep 2015 20:16:02 +0000 (20:16 +0000)]
LP#1501471: check OU setting view_perms only when needed

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
10 years agoLP#1251415: (follow-up) fix typos
Galen Charlton [Wed, 4 Nov 2015 22:03:59 +0000 (22:03 +0000)]
LP#1251415: (follow-up) fix typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1251415: (follow-up) update release note extension
Galen Charlton [Wed, 4 Nov 2015 21:57:16 +0000 (21:57 +0000)]
LP#1251415: (follow-up) update release note extension

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1251415: juv-to-adult release notes
Bill Erickson [Wed, 19 Aug 2015 14:02:37 +0000 (10:02 -0400)]
LP#1251415: juv-to-adult release notes

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1251415: Juv-to-adult live test
Bill Erickson [Fri, 14 Aug 2015 14:54:31 +0000 (10:54 -0400)]
LP#1251415: Juv-to-adult live test

Confirms org unit setting takes precedence and deleted users are
ignored.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1251415: Skip deleted users in juvenile update
Bill Erickson [Mon, 10 Aug 2015 20:05:45 +0000 (16:05 -0400)]
LP#1251415: Skip deleted users in juvenile update

Avoid setting juvenile = false on deleted users during the batch
juvenile update routine, even if they are a million years old.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1251415: Use the juvenile setting when removing juvenile flag.
Steven Callender [Thu, 14 Nov 2013 20:07:33 +0000 (15:07 -0500)]
LP#1251415: Use the juvenile setting when removing juvenile flag.

When calling the API open-ils.storage.actor.user.juvenile_to_adult,
most notably from the juv_to_adult.srfsh support script, instead of
strictly using the hardcoded passed value, first check the
global.juvenile_age_threshold from the settings based on the user's
home library. If the setting does not exist, then fall back on the
hardcoded passed value.

This will allow each library to be able to set different juvenile
thresholds if needed and at the very least, give control to the
settings rather than rely strictly on the hardcoded passed value.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1502152: (follow-up) fix a typo
Galen Charlton [Wed, 4 Nov 2015 21:51:02 +0000 (21:51 +0000)]
LP#1502152: (follow-up) fix a typo

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP 1502152: Improve marc_export warnings.
Jason Stephenson [Mon, 5 Oct 2015 16:35:37 +0000 (12:35 -0400)]
LP 1502152: Improve marc_export warnings.

Trap warnings from MARC libraries in marc_export so we can report the
id of the record that triggered the warning.

Use warn to print our warnings, instead of print STDERR.  This includes
the existing errors, trapped by eval, that were being printed to STDERR.

To test
-------
[1] Ensure that a record has an error that would become apparent
    during export.  An easy way to do this is to insert the "‡"
    character in the contents of a subfield, then use
    --encoding MARC8 when exporting the record.
[2] Run the MARC export, e.g.,

    cat id_list | marc_export -i > /tmp/bibs.mrc
[3] Verify that a warning is reported, e.g.,

Warning from bibliographic record 1: no mapping found at position 0...

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1384740: remove ersatz --auth-source switch
Galen Charlton [Wed, 4 Nov 2015 20:27:33 +0000 (20:27 +0000)]
LP#1384740: remove ersatz --auth-source switch

Looks like a bit of copy-and-pastitis; authority records
don't presently have an equivalent to the Evergreen bib
source.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1384740: (follow-up) change extension of release note
Galen Charlton [Wed, 4 Nov 2015 18:39:55 +0000 (18:39 +0000)]
LP#1384740: (follow-up) change extension of release note

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1384740 MARC stream importer auth release notes
Bill Erickson [Tue, 18 Aug 2015 14:47:56 +0000 (10:47 -0400)]
LP#1384740 MARC stream importer auth release notes

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1384740 MARC stream (etc) use auth nonce
Bill Erickson [Wed, 24 Jun 2015 15:00:25 +0000 (11:00 -0400)]
LP#1384740 MARC stream (etc) use auth nonce

Add an authentication nonce to the shared oils_header.pl file to avoid
too-many-logins by a single username causing login rejections.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>