1 # frozen_string_literal: true
3 class OldElementsController < ApplicationController
4 include PaginationMethods
8 before_action :authorize_web
9 before_action :set_locale
10 before_action -> { check_database_readable(:need_api => true) }
11 before_action :require_oauth
15 before_action :require_moderator_for_unredacted_history
16 around_action :web_timeout
20 def require_moderator_for_unredacted_history
21 deny_access(nil) if params[:show_redactions] && !current_user&.moderator?