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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user