2024-01-31 13:04:24 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ::AdPlugin
|
|
|
|
module GuardianExtensions
|
|
|
|
def show_dfp_ads?
|
2024-02-08 21:42:40 -05:00
|
|
|
!self.user.in_any_groups?(SiteSetting.dfp_exclude_groups_map)
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_adsense_ads?
|
2024-02-08 21:42:40 -05:00
|
|
|
!self.user.in_any_groups?(SiteSetting.adsense_exclude_groups_map)
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_carbon_ads?
|
2024-02-08 21:42:40 -05:00
|
|
|
!self.user.in_any_groups?(SiteSetting.carbonads_exclude_groups_map)
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_amazon_ads?
|
2024-02-08 21:42:40 -05:00
|
|
|
!self.user.in_any_groups?(SiteSetting.amazon_exclude_groups_map)
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def show_adbutler_ads?
|
2024-02-08 21:42:40 -05:00
|
|
|
!self.user.in_any_groups?(SiteSetting.adbutler_exclude_groups_map)
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
2024-02-15 16:52:15 -05:00
|
|
|
|
|
|
|
def show_to_groups?
|
|
|
|
!self.user.in_any_groups?(SiteSetting.no_ads_for_groups_map)
|
|
|
|
end
|
2024-01-31 13:04:24 -05:00
|
|
|
end
|
|
|
|
end
|