url_verify perm/org setting seed data
authorBill Erickson <berick@esilibrary.com>
Thu, 9 Aug 2012 13:38:33 +0000 (09:38 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 9 Aug 2012 13:38:33 +0000 (09:38 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.url_verify.sql

index b7d4b4f..6f6fa9f 100644 (file)
@@ -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;
 
index d79012a..664041e 100644 (file)
@@ -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
     );
 
+
index 84b1340..f890806 100644 (file)
@@ -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;