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
@@ -71,6 +71,10 @@ after_initialize do
scope.show_adbutler_ads?
end
add_to_serializer :current_user, :show_to_groups do
scope.show_to_groups?
end
class ::AdstxtController < ::ApplicationController
skip_before_action :preload_json, :check_xhr, :redirect_to_login_if_required