From 0c4e0ec5116c28993843c808000f99622363dc54 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Wed, 6 May 2020 14:22:49 -0700 Subject: [PATCH] LP#1835127: scoped permissions for reservations Signed-off-by: Jeff Davis Signed-off-by: Chris Sharp --- Open-ILS/examples/fm_IDL.xml | 24 ++++++++++++++-------- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 4 ++++ .../XXXX.data.permission.booking_reservation.sql | 12 +++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.permission.booking_reservation.sql diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index e47f7228b3..a312c105ef 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -5431,10 +5431,10 @@ SELECT usr, - - - - + + + + @@ -5451,10 +5451,18 @@ SELECT usr, - - - - + + + + + + + + + + + + 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 8f31296ed5..efab317842 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1945,6 +1945,10 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES 'Allows a user to configure Matomo Analytics org unit settings', 'ppl', 'description')), ( 624, 'MANAGE_RESERVES', oils_i18n_gettext(624, 'Allows user to manage Courses, Course Materials, and associate Users with Courses.', 'ppl', 'description')) + ( 625, 'VIEW_BOOKING_RESERVATION', oils_i18n_gettext(623, + 'View booking reservations', 'ppl', 'description')), + ( 626, 'VIEW_BOOKING_RESERVATION_ATTR_MAP', oils_i18n_gettext(624, + 'View booking reservation attribute maps', 'ppl', 'description')) ; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.permission.booking_reservation.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.permission.booking_reservation.sql new file mode 100644 index 0000000000..3259ad4687 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.permission.booking_reservation.sql @@ -0,0 +1,12 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT INTO permission.perm_list ( id, code, description ) VALUES + ( 623, 'VIEW_BOOKING_RESERVATION', oils_i18n_gettext(623, + 'View booking reservations', 'ppl', 'description')), + ( 624, 'VIEW_BOOKING_RESERVATION_ATTR_MAP', oils_i18n_gettext(624, + 'View booking reservation attribute maps', 'ppl', 'description')) +; + +COMMIT; -- 2.11.0