From: gmc Date: Wed, 27 Oct 2010 16:51:15 +0000 (+0000) Subject: remove unused settings and permission X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=309e9de5ffe7300d850aacdb179a38a1e485971a;p=contrib%2FConifer.git remove unused settings and permission 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@18495 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 5d339fb5fc..6c4baf98df 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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, diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index 007ebe97b3..314f3077c8 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -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', diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index dee49b8a2e..3fbc6cd0dd 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -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 index 0000000000..296da51dda --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql @@ -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;