mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: Convert min_trust_level_to_allow_ignore to groups (#24894)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_to_allow_ignore site setting to ignore_allowed_groups. This PR maintains backwards compatibility until we can update plugins and themes using this.
This commit is contained in:
@ -557,7 +557,8 @@ class Guardian
|
||||
|
||||
def can_ignore_users?
|
||||
return false if anonymous?
|
||||
@user.staff? || @user.has_trust_level?(SiteSetting.min_trust_level_to_allow_ignore.to_i)
|
||||
@user.staff? || @user.has_trust_level?(SiteSetting.min_trust_level_to_allow_ignore.to_i) ||
|
||||
@user.in_any_groups?(SiteSetting.ignore_allowed_groups_map)
|
||||
end
|
||||
|
||||
def allowed_theme_repo_import?(repo)
|
||||
|
Reference in New Issue
Block a user