remove unused settings and permission
authorgmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 27 Oct 2010 16:51:15 +0000 (16:51 +0000)
committergmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 27 Oct 2010 16:51:15 +0000 (16:51 +0000)
circ.holds.alert_if_local_avail and circ.holds.deny_if_local_avail
are redundant; circ.holds.hold_has_copy_at.{alert|block} are the
settings that will actually be used.  Also remove a related,
redundant permission.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

git-svn-id: svn://svn.open-ils.org/ILS/trunk@18495 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql [new file with mode: 0644]

index 5d339fb..6c4baf9 100644 (file)
@@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0446'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0447'); -- gmc
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 007ebe9..314f307 100644 (file)
@@ -945,8 +945,6 @@ INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 373, 'DELETE
      'Allow a user to delete trigger validators' );
 INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 374, 'UPDATE_TRIGGER_VALIDATOR',
      'Allow a user to update trigger validators' );
-INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 375, 'HOLD_LOCAL_AVAIL_OVERRIDE',
-     'Allow a user to place a hold despite the availability of a local copy' );
 INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 376, 'ADMIN_BOOKING_RESOURCE',
      'Enables the user to create/update/delete booking resources' );
 INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 377, 'ADMIN_BOOKING_RESOURCE_TYPE',
@@ -2149,19 +2147,6 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
         'integer'
 );
 
-INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
-    VALUES 
-        ('circ.holds.alert_if_local_avail',
-         'Holds: Local available alert',
-         'If local copy is available, alert the person making the hold',
-         'bool'),
-
-        ('circ.holds.deny_if_local_avail',
-         'Holds: Local available block',
-         'If local copy is available, deny the creation of the hold',
-         'bool')
-    ;
-
 INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
     VALUES ( 
         'circ.holds.clear_shelf.no_capture_holds',
index dee49b8..3fbc6cd 100644 (file)
@@ -1338,8 +1338,6 @@ INSERT INTO permission.perm_list VALUES
     (350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description')),
 
 -- additional permissions
-    (351, 'HOLD_LOCAL_AVAIL_OVERRIDE', oils_i18n_gettext(351, 'Allow a user to place a hold despite the availability of a local copy', 'ppl', 'description')),
-
     (352, 'ADMIN_BOOKING_RESOURCE', oils_i18n_gettext(352, 'Enables the user to create/update/delete booking resources', 'ppl', 'description')),
     (353, 'ADMIN_BOOKING_RESOURCE_TYPE', oils_i18n_gettext(353, 'Enables the user to create/update/delete booking resource types', 'ppl', 'description')),
     (354, 'ADMIN_BOOKING_RESOURCE_ATTR', oils_i18n_gettext(354, 'Enables the user to create/update/delete booking resource attributes', 'ppl', 'description')),
@@ -6742,20 +6740,6 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
 
 INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
     VALUES
-        ('circ.holds.alert_if_local_avail',
-         oils_i18n_gettext('circ.holds.alert_if_local_avail',
-             'Holds: Local available alert', 'coust', 'label'),
-         oils_i18n_gettext('circ.holds.alert_if_local_avail',
-            'If local copy is available, alert the person making the hold', 'coust', 'description'),
-         'bool'),
-
-        ('circ.holds.deny_if_local_avail',
-         oils_i18n_gettext('circ.holds.deny_if_local_avail',
-            'Holds: Local available block', 'coust', 'label'),
-         oils_i18n_gettext('circ.holds.deny_if_local_avail',
-            'If local copy is available, deny the creation of the hold', 'coust', 'description'),
-         'bool'),
-
         ('circ.holds.clear_shelf.no_capture_holds',
         oils_i18n_gettext( 'circ.holds.clear_shelf.no_capture_holds',
             'Holds: Bypass hold capture during clear shelf process', 'coust', 'label'),
diff --git a/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql b/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql
new file mode 100644 (file)
index 0000000..296da51
--- /dev/null
@@ -0,0 +1,22 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0447'); -- gmc
+
+-- undo 0077.data.holds_local_avail_and_override.sql
+DELETE FROM actor.org_unit_setting WHERE name IN (
+    'circ.holds.alert_if_local_avail',
+    'circ.holds.deny_if_local_avail'
+);
+DELETE FROM config.org_unit_setting_type WHERE name IN (
+    'circ.holds.alert_if_local_avail',
+    'circ.holds.deny_if_local_avail'
+);
+DELETE FROM permission.usr_perm_map WHERE perm = (
+   SELECT id FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE'
+);
+DELETE FROM permission.grp_perm_map WHERE perm = (
+   SELECT id FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE'
+);
+DELETE FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE';
+
+COMMIT;