ACQ+Vandelay permission improvements
authorBill Erickson <berick@esilibrary.com>
Thu, 19 Jan 2012 19:02:32 +0000 (14:02 -0500)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 15 Mar 2012 19:23:52 +0000 (15:23 -0400)
commit5866d95542d1059290ed57428abf6f812a4b1afa
tree4d83bacb0ed76666f37a17fb953405246fe37e0e
parent365a68598b0291092f69aa107bee634a8e53aa65
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