mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:27:15 +08:00
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
This commit is contained in:

committed by
GitHub

parent
5077cf52fd
commit
e0d9232259
@ -204,15 +204,15 @@ class GlobalSetting
|
||||
end
|
||||
|
||||
# test only
|
||||
def self.reset_whitelisted_theme_ids!
|
||||
@whitelisted_theme_ids = nil
|
||||
def self.reset_allowed_theme_ids!
|
||||
@allowed_theme_ids = nil
|
||||
end
|
||||
|
||||
def self.whitelisted_theme_ids
|
||||
return nil if whitelisted_theme_repos.blank?
|
||||
def self.allowed_theme_ids
|
||||
return nil if allowed_theme_repos.blank?
|
||||
|
||||
@whitelisted_theme_ids ||= begin
|
||||
urls = whitelisted_theme_repos.split(",").map(&:strip)
|
||||
@allowed_theme_ids ||= begin
|
||||
urls = allowed_theme_repos.split(",").map(&:strip)
|
||||
Theme
|
||||
.joins(:remote_theme)
|
||||
.where('remote_themes.remote_url in (?)', urls)
|
||||
|
Reference in New Issue
Block a user