Add ADJUST_BILLS permission to seed data user/kmlussier/lp1494544_add_missing_adjust_perm
authorDan Wells <dbw2@calvin.edu>
Mon, 14 Sep 2015 15:12:38 +0000 (11:12 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 15 Sep 2015 12:46:53 +0000 (08:46 -0400)
This commit adds the new ADJUST_BILLS permission to the seed data.
Note that the upgrade script only adds the perm and avoids adding it
to any groups, as that should only be done with local discretion.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.adjust_bills_perm.sql [new file with mode: 0644]

index 9c44f82..ee87ff5 100644 (file)
@@ -1596,7 +1596,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  (  561, 'AVAIL_HOLD_COPY_RATIO_EXCEEDED.override', oils_i18n_gettext( 561,
     'Override the AVAIL_HOLD_COPY_RATIO_EXCEEDED event', 'ppl', 'description')),
  ( 562, 'ADMIN_TAG_TABLE', oils_i18n_gettext( 562, 
-    'Allow administration of MARC tag tables', 'ppl', 'description' ))
+    'Allow administration of MARC tag tables', 'ppl', 'description' )),
+ ( 563, 'ADJUST_BILLS', oils_i18n_gettext( 563,
+    'Allow a user to adjust a bill (generally to zero)', 'ppl', 'description' ))
 ;
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
@@ -1971,6 +1973,7 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
                pgt.name = 'Circulators' AND
                aout.name = 'Branch' AND
                perm.code IN (
+                       'ADJUST_BILLS',
                        'ADMIN_BOOKING_RESERVATION',
                        'ADMIN_BOOKING_RESOURCE',
                        'ADMIN_BOOKING_RESOURCE_ATTR',
@@ -2101,6 +2104,7 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
                pgt.name = 'Circulation Administrator' AND
                aout.name = 'System' AND
                perm.code IN (
+                       'ADJUST_BILLS',
                        'ADMIN_BOOKING_RESERVATION',
                        'ADMIN_BOOKING_RESERVATION_ATTR_MAP',
                        'ADMIN_BOOKING_RESERVATION_ATTR_VALUE_MAP',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.adjust_bills_perm.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.adjust_bills_perm.sql
new file mode 100644 (file)
index 0000000..2c54ea0
--- /dev/null
@@ -0,0 +1,17 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO permission.perm_list (id, code, description)
+    VALUES (
+        563,
+        'ADJUST_BILLS',
+        oils_i18n_gettext(
+            563,
+            'Allow a user to adjust a bill (generally to zero)',
+            'ppl',
+            'description'
+        )
+    );
+
+COMMIT;