whitelisting for blackbox

This commit is contained in:
Kyle Drake 2019-12-18 20:43:04 -08:00
parent 675a182b89
commit 82462b2461
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,9 @@
Sequel.migration do
up {
DB.add_column :sites, :blackbox_whitelisted, :boolean, default: false
}
down {
DB.drop_column :sites, :blackbox_whitelisted
}
end

View file

@ -1684,7 +1684,10 @@ class Site < Sequel::Model
end
if pathname.extname.match(HTML_REGEX) && defined?(BlackBox)
BlackBox.tos_violation_check self, uploaded
begin
BlackBox.tos_violation_check self, uploaded
rescue
end
end
relative_path_dir = Pathname(relative_path).dirname