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:
Régis Hanol
2024-07-04 19:27:26 +02:00
committed by GitHub
parent a30a861546
commit 0dbcc54d4b
8 changed files with 83 additions and 76 deletions

View File

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