Fix saved searces, news updates, ip bans being dumped to BigQuery.
Prevent saved searches, news updates, and ip bans from being publicly dumped to BigQuery. They didn't override the `visible` method to restrict their visibility for anonymous users.
This commit is contained in:
@@ -2,7 +2,7 @@ class ForumTopicVisitsController < ApplicationController
|
||||
respond_to :xml, :json
|
||||
|
||||
def index
|
||||
@forum_topic_visits = ForumTopicVisit.where(user: CurrentUser.user).paginated_search(params)
|
||||
@forum_topic_visits = ForumTopicVisit.visible(CurrentUser.user).paginated_search(params)
|
||||
respond_with(@forum_topic_visits)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
class NewsUpdatesController < ApplicationController
|
||||
respond_to :html
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
def index
|
||||
authorize NewsUpdate
|
||||
@news_updates = NewsUpdate.order("id desc").paginate(params[:page], :limit => params[:limit])
|
||||
@news_updates = NewsUpdate.visible(CurrentUser.user).paginated_search(params, count_pages: true)
|
||||
respond_with(@news_updates)
|
||||
end
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ class SavedSearchesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
def index
|
||||
@saved_searches = authorize SavedSearch.where(user: CurrentUser.user).paginated_search(params, count_pages: true)
|
||||
@saved_searches = authorize SavedSearch.visible(CurrentUser.user).paginated_search(params, count_pages: true)
|
||||
respond_with(@saved_searches)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user