ACQ+Vandelay permission improvements
authorBill Erickson <berick@esilibrary.com>
Thu, 19 Jan 2012 19:02:32 +0000 (14:02 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 13 Mar 2012 19:27:11 +0000 (15:27 -0400)
commite65acab943a624c57673cd2b80ea483c63ed934b
tree6063f92d16fea8d835939ee5be42af8a1db27a6d
parent12757f3d4e0767e9d23bf2c4172553360f0842cd
ACQ+Vandelay permission improvements

Be more vigilant about enforcing permissions for various ACQ and
Vandelay actions.

1. Using vandelay to create new bib records now requres the IMPORT_MARC
permission (same as open-ils.cat.biblio.record.xml.import).  If the
permission fails, the queued record will fail import and be stamped with
a new "import.record.perm_failure" vandelay import error.

2. Added suport for testing additional permissions before a new record
is created via vandelay.  This allows interfaces leveraging vandelay
(e.g. ACQ) to create a higher barrier to entry.  Added an ACQ perm
IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD that prevents users from creating
new bib records directly from the ACQ vendor MARC file upload interface.

The secondary permission is not meant as a security enhancement, per se,
since the user is required to have the IMPORT_MARC permission to get this
far in the process.  It's more of a feature-specific precautionary
permission to prevent unintended record creation within certain
permission groups.

3. Checking the CREATE_PURCHASE_ORDER permission during the ACQ vendor
file upload process.  It's absence appears to have been an oversight.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-vandelay-integration.sql