about summary refs log tree commit diff
path: root/app/helpers/domain_control_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/domain_control_helper.rb')
-rw-r--r--app/helpers/domain_control_helper.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/helpers/domain_control_helper.rb b/app/helpers/domain_control_helper.rb
index efd328f81..067b2c2cd 100644
--- a/app/helpers/domain_control_helper.rb
+++ b/app/helpers/domain_control_helper.rb
@@ -12,6 +12,14 @@ module DomainControlHelper
       end
     end
 
-    DomainBlock.blocked?(domain)
+    if whitelist_mode?
+      !DomainAllow.allowed?(domain)
+    else
+      DomainBlock.blocked?(domain)
+    end
+  end
+
+  def whitelist_mode?
+    Rails.configuration.x.whitelist_mode
   end
 end