]> git.openstreetmap.org Git - rails.git/blobdiff - script/update-spam-blocks
Test that closing and deleting notes require authentication
[rails.git] / script / update-spam-blocks
index 381ef3c1a335c0f9095287bef9290424f08fff22..c21b17cff0ca0293bd3962fabc1f78a2714f6919 100755 (executable)
@@ -12,18 +12,17 @@ addresses = User.count(
 )
 
 addresses.each do |address,count|
 )
 
 addresses.each do |address,count|
-  if count > 2
+  if count > 1
     acl = Acl.find(:first, :conditions => {
       :address => address,
     })
 
     unless acl
     acl = Acl.find(:first, :conditions => {
       :address => address,
     })
 
     unless acl
-      Acl.create(
+      Acl.create({
         :address => address,
         :address => address,
-        :netmask => "255.255.255.255",
         :k => "no_account_creation",
         :v => "auto_spam_block"
         :k => "no_account_creation",
         :v => "auto_spam_block"
-      )
+      }, :without_protection => true)
 
       puts "Blocked #{address}"
     end
 
       puts "Blocked #{address}"
     end