From fa5fc15f91d133a2d0d4f44ae834ab80ac8d104b Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Thu, 26 May 2011 12:43:41 -0400 Subject: [PATCH] map these perms to stock perm groups Signed-off-by: Jason Etheridge Signed-off-by: Dan Wells --- .../Pg/upgrade/0542.data.perm-list.misc-cat.sql | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/Open-ILS/src/sql/Pg/upgrade/0542.data.perm-list.misc-cat.sql b/Open-ILS/src/sql/Pg/upgrade/0542.data.perm-list.misc-cat.sql index b4f5615fd0..0398dcf84e 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0542.data.perm-list.misc-cat.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0542.data.perm-list.misc-cat.sql @@ -27,4 +27,162 @@ INSERT INTO permission.perm_list VALUES ,(506, 'VIEW_USER_SETTING_TYPE', oils_i18n_gettext(506, 'Allows viewing of configurable user setting types.', 'ppl', 'description')) ; +-- stock Staff group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth ) + SELECT + 3, + id, + 0 + FROM permission.perm_list + WHERE code in ( + 'CREATE_PURCHASE_REQUEST' + ,'VIEW_USER_SETTING_TYPE' + ); + + +-- stock Circulators group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth ) + SELECT + 5, + id, + 0 + FROM permission.perm_list + WHERE code in ( + 'MARK_ITEM_MISSING_PIECES' + ); + +--- stock Circulation Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 4, + id, + 0, + 't' + FROM permission.perm_list + WHERE code in ( + 'MARK_ITEM_MISSING_PIECES' + ,'UPDATE_HOLD_REQUEST_TIME' + ); + +-- stock Catalogers group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth ) + SELECT + 5, + id, + 0 + FROM permission.perm_list + WHERE code in ( + 'MAP_MONOGRAPH_PART' + ,'ADMIN_SERIAL_ITEM' + ); + +-- stock Cataloging Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 8, + id, + 0, + 't' + FROM permission.perm_list + WHERE code in ( + 'MAP_MONOGRAPH_PART' + ,'ADMIN_SERIAL_ITEM' + ,'CREATE_VOLUME_SUFFIX' + ,'UPDATE_VOLUME_SUFFIX' + ,'DELETE_VOLUME_SUFFIX' + ,'CREATE_VOLUME_PREFIX' + ,'UPDATE_VOLUME_PREFIX' + ,'DELETE_VOLUME_PREFIX' + ,'CREATE_MONOGRAPH_PART' + ,'UPDATE_MONOGRAPH_PART' + ,'DELETE_MONOGRAPH_PART' + ,'CREATE_BIB_PTYPE' + ,'UPDATE_BIB_PTYPE' + ,'DELETE_BIB_PTYPE' + ); + +-- stock Serials group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth ) + SELECT + 11, + id, + 0 + FROM permission.perm_list + WHERE code in ( + 'ADMIN_SERIAL_ITEM' + ); + + +-- stock Acquisitions group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth ) + SELECT + 7, + id, + 0 + FROM permission.perm_list + WHERE code in ( + 'UPDATE_PICKLIST' + ); + +--- stock Acquisitions Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 8, + id, + 0, + 't' + FROM permission.perm_list + WHERE code in ( + 'UPDATE_PICKLIST' + ); + +--- stock Local Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 10, + id, + 2, + 't' + FROM permission.perm_list + WHERE code in ( + 'UPDATE_WORKSTATION' + ); + +--- stock System Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 11, + id, + 1, + 't' + FROM permission.perm_list + WHERE code in ( + 'UPDATE_WORKSTATION' + ); + +--- stock Global Administrator group + +INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable ) + SELECT + 12, + id, + 0, + 't' + FROM permission.perm_list + WHERE code in ( + 'UPDATE_WORKSTATION' + ,'ADMIN_SVF' + ,'ADMIN_CODED_VALUE' + ); + COMMIT; -- 2.11.0