mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: use new 'ignore allowed groups' site settings (#27670)
Instead of the deprecated 'min trust level to allow ignore' in order to reduce the number of deprecation notices in the logs. This tweaks a few serializers so that the 'can_ignore_users?` property is always coming from the server and properly used on the client-side.
This commit is contained in:
@ -559,8 +559,7 @@ 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.in_any_groups?(SiteSetting.ignore_allowed_groups_map)
|
||||
@user.staff? || @user.in_any_groups?(SiteSetting.ignore_allowed_groups_map)
|
||||
end
|
||||
|
||||
def allowed_theme_repo_import?(repo)
|
||||
|
Reference in New Issue
Block a user