1
0
mirror of synced 2026-08-05 01:46:54 +00:00

FIX: Calculate no ads for groups server side (#200)

If the selected group to not display ads to had its visibility set to
not be visible then this setting wouldn't work correctly because that
group wouldn't be available client side. The change moves that group
check to be server side so that we can correctly see all the groups that
should not see ads.
This commit is contained in:
Blake Erickson
2024-02-15 14:52:15 -07:00
committed by GitHub
parent 1677f7ae39
commit b0c95114ea
8 changed files with 16 additions and 18 deletions
+4
View File
@@ -21,5 +21,9 @@ module ::AdPlugin
def show_adbutler_ads?
!self.user.in_any_groups?(SiteSetting.adbutler_exclude_groups_map)
end
def show_to_groups?
!self.user.in_any_groups?(SiteSetting.no_ads_for_groups_map)
end
end
end