Add whitelist mode (#11291)
This commit is contained in:
parent
85b7b565de
commit
24552b5160
44 changed files with 302 additions and 53 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue