Un-stamped upgrade script for collection exempt perm
authorBill Erickson <berick@esilibrary.com>
Fri, 3 Jun 2011 13:28:42 +0000 (09:28 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 14 Jul 2011 19:44:36 +0000 (15:44 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql [new file with mode: 0644]

index d82af0b..6f1a071 100644 (file)
@@ -1423,7 +1423,7 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
     'Allows update of a workstation during workstation registration override.', 'ppl', 'description')),
  ( 506, 'VIEW_USER_SETTING_TYPE', oils_i18n_gettext(506,
     'Allows viewing of configurable user setting types.', 'ppl', 'description')),
- ( 509, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(509,
+ ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
     'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
 
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql
new file mode 100644 (file)
index 0000000..dc4c2fd
--- /dev/null
@@ -0,0 +1,26 @@
+-- Evergreen DB patch XXXX.data.collections_exempt_perm.sql
+--
+-- Adds a new UPDATE_PATRON_COLLECTIONS_EXEMPT permission
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO permission.perm_list ( id, code, description ) 
+    VALUES ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
+    'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
+
+--- 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 ('UPDATE_PATRON_COLLECTIONS_EXEMPT');
+
+COMMIT;