mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +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
@ -477,9 +477,9 @@ class Guardian
|
||||
def allowed_theme_repo_import?(repo)
|
||||
return false if !@user.admin?
|
||||
|
||||
whitelisted_repos = GlobalSetting.whitelisted_theme_repos
|
||||
if !whitelisted_repos.blank?
|
||||
urls = whitelisted_repos.split(",").map(&:strip)
|
||||
allowed_repos = GlobalSetting.allowed_theme_repos
|
||||
if !allowed_repos.blank?
|
||||
urls = allowed_repos.split(",").map(&:strip)
|
||||
return urls.include?(repo)
|
||||
end
|
||||
|
||||
@ -489,8 +489,8 @@ class Guardian
|
||||
def allow_themes?(theme_ids, include_preview: false)
|
||||
return true if theme_ids.blank?
|
||||
|
||||
if whitelisted_theme_ids = GlobalSetting.whitelisted_theme_ids
|
||||
if (theme_ids - whitelisted_theme_ids).present?
|
||||
if allowed_theme_ids = GlobalSetting.allowed_theme_ids
|
||||
if (theme_ids - allowed_theme_ids).present?
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user