From 20ac557e84d7477906c4bd502a46bc91bcacfa5e Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 4 Feb 2020 19:52:25 -0500 Subject: [PATCH] LP#1862022: add more permissions to stock Acquisitions and Acq Admin profiles This patch makes the stock Acquisitions and Acquisitions Administrator profiles better able to use the acquisitions modules out of the box. The permissions added are: Acquisitions Administrator Profile ----------------------------------------- VIEW_FUND VIEW_FUNDING_SOURCE VIEW_FUND_ALLOCATION VIEW_PICKLIST VIEW_PROVIDER VIEW_PURCHASE_ORDER VIEW_INVOICE CREATE_PICKLIST ACQ_ADD_LINEITEM_IDENTIFIER ACQ_SET_LINEITEM_IDENTIFIER MANAGE_FUND CREATE_INVOICE CREATE_PURCHASE_ORDER IMPORT_ACQ_LINEITEM_BIB_RECORD IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD MANAGE_CLAIM MANAGE_PROVIDER MANAGE_FUNDING_SOURCE RECEIVE_PURCHASE_ORDER ADMIN_ACQ_LINEITEM_ALERT_TEXT UPDATE_FUNDING_SOURCE UPDATE_PROVIDER VIEW_IMPORT_MATCH_SET VIEW_MERGE_PROFILE IMPORT_MARC Acquisitions Profile ----------------------------------------- ACQ_ADD_LINEITEM_IDENTIFIER ACQ_SET_LINEITEM_IDENTIFIER ADMIN_ACQ_FUND ADMIN_FUND ACQ_INVOICE-REOPEN ADMIN_ACQ_DISTRIB_FORMULA ADMIN_INVOICE IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD VIEW_IMPORT_MATCH_SET VIEW_MERGE_PROFILE Signed-off-by: Galen Charlton Signed-off-by: Tiffany Little Signed-off-by: Bill Erickson --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 35 ++++++++++++ .../sql/Pg/upgrade/YYYY.data.acq_permissions.sql | 65 ++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.data.acq_permissions.sql diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 7ddbde596a..2543707732 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -2628,6 +2628,13 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) pgt.name = 'Acquisitions' AND aout.name = 'Consortium' AND perm.code IN ( + 'ACQ_ADD_LINEITEM_IDENTIFIER', + 'ACQ_INVOICE-REOPEN', + 'ACQ_SET_LINEITEM_IDENTIFIER', + 'ADMIN_ACQ_FUND', + 'ADMIN_ACQ_DISTRIB_FORMULA', + 'ADMIN_FUND', + 'ADMIN_INVOICE', 'ALLOW_ALT_TCN', 'CLEAR_PURCHASE_REQUEST', 'CREATE_BIB_IMPORT_QUEUE', @@ -2644,6 +2651,7 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) 'DELETE_VOLUME_NOTE', 'GENERAL_ACQ', 'IMPORT_ACQ_LINEITEM_BIB_RECORD', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD', 'IMPORT_MARC', 'MANAGE_CLAIM', 'MANAGE_FUND', @@ -2686,6 +2694,8 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) 'VIEW_PICKLIST', 'VIEW_PROVIDER', 'VIEW_PURCHASE_ORDER', + 'VIEW_IMPORT_MATCH_SET', + 'VIEW_MERGE_PROFILE' 'VIEW_REPORT_OUTPUT'); @@ -2744,6 +2754,31 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) 'UPDATE_ACQ_FUNDING_SOURCE', 'UPDATE_INVOICE_ITEM_TYPE', 'UPDATE_INVOICE_METHOD', + 'VIEW_FUND', + 'VIEW_FUNDING_SOURCE', + 'VIEW_FUND_ALLOCATION', + 'VIEW_PICKLIST', + 'VIEW_PROVIDER', + 'VIEW_PURCHASE_ORDER', + 'VIEW_INVOICE', + 'CREATE_PICKLIST', + 'ACQ_ADD_LINEITEM_IDENTIFIER', + 'ACQ_SET_LINEITEM_IDENTIFIER', + 'MANAGE_FUND', + 'CREATE_INVOICE', + 'CREATE_PURCHASE_ORDER', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD', + 'MANAGE_CLAIM', + 'MANAGE_PROVIDER', + 'MANAGE_FUNDING_SOURCE', + 'RECEIVE_PURCHASE_ORDER', + 'ADMIN_ACQ_LINEITEM_ALERT_TEXT', + 'UPDATE_FUNDING_SOURCE', + 'UPDATE_PROVIDER', + 'VIEW_IMPORT_MATCH_SET', + 'VIEW_MERGE_PROFILE', + 'IMPORT_MARC', 'UPDATE_PICKLIST' ); diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.acq_permissions.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.acq_permissions.sql new file mode 100644 index 0000000000..45e33fd6b1 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.acq_permissions.sql @@ -0,0 +1,65 @@ +BEGIN; + +INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) + SELECT + pgt.id, perm.id, aout.depth, TRUE + FROM + permission.grp_tree pgt, + permission.perm_list perm, + actor.org_unit_type aout + WHERE + pgt.name = 'Acquisitions Administrator' AND + aout.name = 'Consortium' AND + perm.code IN ( + 'VIEW_FUND', + 'VIEW_FUNDING_SOURCE', + 'VIEW_FUND_ALLOCATION', + 'VIEW_PICKLIST', + 'VIEW_PROVIDER', + 'VIEW_PURCHASE_ORDER', + 'VIEW_INVOICE', + 'CREATE_PICKLIST', + 'ACQ_ADD_LINEITEM_IDENTIFIER', + 'ACQ_SET_LINEITEM_IDENTIFIER', + 'MANAGE_FUND', + 'CREATE_INVOICE', + 'CREATE_PURCHASE_ORDER', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD', + 'MANAGE_CLAIM', + 'MANAGE_PROVIDER', + 'MANAGE_FUNDING_SOURCE', + 'RECEIVE_PURCHASE_ORDER', + 'ADMIN_ACQ_LINEITEM_ALERT_TEXT', + 'UPDATE_FUNDING_SOURCE', + 'UPDATE_PROVIDER', + 'VIEW_IMPORT_MATCH_SET', + 'VIEW_MERGE_PROFILE', + 'IMPORT_MARC' + ); + + +INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) + SELECT + pgt.id, perm.id, aout.depth, FALSE + FROM + permission.grp_tree pgt, + permission.perm_list perm, + actor.org_unit_type aout + WHERE + pgt.name = 'Acquisitions' AND + aout.name = 'Consortium' AND + perm.code IN ( + 'ACQ_ADD_LINEITEM_IDENTIFIER', + 'ACQ_SET_LINEITEM_IDENTIFIER', + 'ADMIN_ACQ_FUND', + 'ADMIN_FUND', + 'ACQ_INVOICE-REOPEN', + 'ADMIN_ACQ_DISTRIB_FORMULA', + 'ADMIN_INVOICE', + 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD', + 'VIEW_IMPORT_MATCH_SET', + 'VIEW_MERGE_PROFILE' + ); + +COMMIT; -- 2.11.0