Skip to content

Commit

Permalink
Remove no longer useful redirect
Browse files Browse the repository at this point in the history
This commit removes the redirect for public requests
from the pro context as it no longer can be ran
  • Loading branch information
alexander-griffen committed Mar 1, 2024
1 parent 6dc3359 commit 3f1896b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions app/controllers/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class RequestController < ApplicationController
before_action :check_read_only, only: [:new, :upload_response]
before_action :set_render_recaptcha, only: [ :new ]
before_action :set_info_request, only: [:show]
before_action :redirect_public_requests_from_pro_context, only: [:show]
before_action :redirect_new_form_to_pro_version, only: [:select_authority, :new]
before_action :set_in_pro_area, only: [:select_authority, :show]

Expand Down Expand Up @@ -709,15 +708,6 @@ def set_render_recaptcha
(!@user || !@user.confirmed_not_spam?)
end

def redirect_public_requests_from_pro_context
# Requests which aren't embargoed should always go to the normal request
# page, so that pro's seem them in that context after they publish them
if feature_enabled?(:alaveteli_pro) && params[:pro] == "1"
@info_request = InfoRequest.find_by_url_title!(params[:url_title])
redirect_to request_url(@info_request) unless @info_request.embargo
end
end

def redirect_new_form_to_pro_version
# Pros should use the pro version of the form
if feature_enabled?(:alaveteli_pro) &&
Expand Down

0 comments on commit 3f1896b

Please sign in to comment.