From: Bill Erickson Date: Thu, 9 Aug 2012 13:38:33 +0000 (-0400) Subject: url_verify perm/org setting seed data X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=110d464ca0fffdf6471a9a4a8433a72623d809f5;p=evergreen%2Fequinox.git url_verify perm/org setting seed data Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm index b7d4b4f05c..6f6fa9f235 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm @@ -151,7 +151,10 @@ sub validate_session { # Now cycle through the URLs in batches. - my $batch_size = 10; # TODO: org setting + my $batch_size = $U->ou_ancestor_setting_value( + $session->owning_lib, + 'url_verify.verification_batch_size', $e) || 5; + my $num_processed = 0; # total number processed, including redirects my $resp_window = 1; 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 d79012ad08..664041ed5f 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1567,7 +1567,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 538, 'VIEW_SEARCH_FILTER_GROUP', oils_i18n_gettext( 538, 'Allows staff to view search filter groups and entries', 'ppl', 'description' )), ( 539, 'URL_VERIFY', oils_i18n_gettext( 539, - 'Allows a user to process and verify ULSs', 'ppl', 'description')) + 'Allows a user to process and verify ULSs', 'ppl', 'description')), + ( 540, 'URL_VERIFY_UPDATE_SETTINGS', oils_i18n_gettext( 540, + 'Allows a user to configure URL verification org unit settings', 'ppl', 'description') ; @@ -11835,7 +11837,6 @@ INSERT into config.org_unit_setting_type 'bool' ); - INSERT INTO config.settings_group (name, label) VALUES ( 'url_verify', @@ -11847,8 +11848,8 @@ INSERT INTO config.settings_group (name, label) ) ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_delay', 'url_verify', @@ -11864,11 +11865,12 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_max_redirects', 'url_verify', @@ -11884,11 +11886,12 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_max_wait', 'url_verify', @@ -11904,11 +11907,13 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) + +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.verification_batch_size', 'url_verify', @@ -11924,6 +11929,8 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); + diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.url_verify.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.url_verify.sql index 84b13403dd..f890806f2a 100644 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.url_verify.sql +++ b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.url_verify.sql @@ -1,4 +1,7 @@ +-- NOTE: beware the use of bare perm IDs in the update_perm's below and in +-- the 950 seed data file. Update before merge to match current perm IDs! XXX + BEGIN; INSERT INTO permission.perm_list (id, code, description) @@ -13,6 +16,20 @@ INSERT INTO permission.perm_list (id, code, description) ) ); + +INSERT INTO permission.perm_list (id, code, description) + VALUES ( + 540, + 540, + oils_i18n_gettext( + 540, + 'Allows a user to configure URL verification org unit settings', + 'ppl', + 'description' + ) + ); + + INSERT INTO config.settings_group (name, label) VALUES ( 'url_verify', @@ -24,8 +41,8 @@ INSERT INTO config.settings_group (name, label) ) ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_delay', 'url_verify', @@ -41,11 +58,12 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_max_redirects', 'url_verify', @@ -61,11 +79,12 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.url_verification_max_wait', 'url_verify', @@ -81,12 +100,13 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); -INSERT into config.org_unit_setting_type - (name, grp, label, description, datatype) +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype, update_perm) VALUES ( 'url_verify.verification_batch_size', 'url_verify', @@ -102,10 +122,10 @@ INSERT into config.org_unit_setting_type 'coust', 'description' ), - 'integer' + 'integer', + 540 ); - COMMIT;