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:
Krzysztof Kotlarek
2020-07-27 10:23:54 +10:00
committed by GitHub
parent 5077cf52fd
commit e0d9232259
130 changed files with 676 additions and 570 deletions

View File

@ -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