[open-ils-commits] r17219 - branches/rel_1_6_1/Open-ILS/src/sql/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Aug 13 15:11:43 EDT 2010
Author: dbs
Date: 2010-08-13 15:11:38 -0400 (Fri, 13 Aug 2010)
New Revision: 17219
Modified:
branches/rel_1_6_1/Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql
branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
Grant permissions related to booking/reservations to circulators and admins
This should make for a better out-of-the-box experience for Evergreen adopters.
The permissions in the upgrade script are outside of the transaction to avoid
rolling back the entire upgrade if a site has already assigned these
permissions.
TODO: Document the new permissions as part of the 1.6.1 release notes so
that sites can alter the upgrade script according to their desires if they
don't like the defaults.
Modified: branches/rel_1_6_1/Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql
===================================================================
--- branches/rel_1_6_1/Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql 2010-08-13 19:08:04 UTC (rev 17218)
+++ branches/rel_1_6_1/Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql 2010-08-13 19:11:38 UTC (rev 17219)
@@ -601,3 +601,20 @@
COMMIT;
CREATE INDEX atev_target_def_idx ON action_trigger.event (target,event_def);
+-- Give circulation staff the ability to handle day-to-day booking/reservation tasks
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'RETRIEVE_RESERVATION_PULL_LIST';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'CAPTURE_RESERVATION';
+
+-- Give local administrators the ability to handle all booking/reservation tasks
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_TYPE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR_MAP';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR_VALUE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION_ATTR_VALUE_MAP';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'HOLD_ITEM_CHECKED_OUT.override';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'RETRIEVE_RESERVATION_PULL_LIST';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'CAPTURE_RESERVATION';
+
Modified: branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-08-13 19:08:04 UTC (rev 17218)
+++ branches/rel_1_6_1/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-08-13 19:11:38 UTC (rev 17219)
@@ -1580,6 +1580,23 @@
-- Ability to merge users
INSERT INTO permission.perm_list (code, description) VALUES ('MERGE_USERS', 'Allows user records to be merged');
+-- Give circulation staff the ability to handle day-to-day booking/reservation tasks
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'RETRIEVE_RESERVATION_PULL_LIST';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 5, id, 2, false FROM permission.perm_list WHERE code = 'CAPTURE_RESERVATION';
+
+-- Give local administrators the ability to handle all booking/reservation tasks
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_TYPE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR_MAP';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESOURCE_ATTR_VALUE';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'ADMIN_BOOKING_RESERVATION_ATTR_VALUE_MAP';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'HOLD_ITEM_CHECKED_OUT.override';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'RETRIEVE_RESERVATION_PULL_LIST';
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) SELECT 10, id, 2, false FROM permission.perm_list WHERE code = 'CAPTURE_RESERVATION';
+
-- Trigger event definition permissions
INSERT INTO permission.perm_list (code, description) VALUES ('ADMIN_TRIGGER_EVENT_DEF', 'Allow a user to administer trigger event definitions');
INSERT INTO permission.perm_list (code, description) VALUES ('ADMIN_TRIGGER_CLEANUP', 'Allow a user to create, delete, and update trigger cleanup entries');
More information about the open-ils-commits
mailing list