1 class OldNodesController < ApplicationController
4 before_action :authorize_web
5 before_action :set_locale
6 before_action -> { check_database_readable(:need_api => true) }
7 before_action :require_oauth
11 before_action :require_moderator_for_unredacted_history
12 around_action :web_timeout
16 @feature = Node.preload(:node_tags, :old_nodes => [:old_tags, { :changeset => [:changeset_tags, :user] }]).find(params[:id])
17 render "browse/history"
18 rescue ActiveRecord::RecordNotFound
19 render "browse/not_found", :status => :not_found
24 @feature = OldNode.preload(:old_tags, :changeset => [:changeset_tags, :user]).find([params[:id], params[:version]])
25 rescue ActiveRecord::RecordNotFound
26 render :action => "not_found", :status => :not_found
31 def require_moderator_for_unredacted_history
32 deny_access(nil) if params[:show_redactions] && !current_user&.moderator?