diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9b3d2849f9..70aac603c1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,11 +3,6 @@ class ApplicationController < ActionController::Base include BopsCore::ApplicationController - BLOCKED_SIDEBAR_EMAILS = %w[ - martyn.evans+demo_southwark_assessor@unboxedconsulting.com - martyn.evans+demo_southwark_reviewer@unboxedconsulting.com - ].freeze - before_action :require_local_authority! before_action :prevent_caching before_action :enforce_user_permissions @@ -105,30 +100,9 @@ def ensure_user_is_reviewer_checking_assessment render plain: "forbidden", status: :forbidden and return unless @planning_application.can_review_assessment? end - def use_new_sidebar_layout?(application_stage) + def use_new_sidebar_layout?(_application_stage = nil) return false unless @planning_application&.pre_application? - return false if current_user&.email&.in?(BLOCKED_SIDEBAR_EMAILS) - - case Rails.configuration.use_new_sidebar_layout - when TrueClass - true - when Hash - permissions = Rails.configuration.use_new_sidebar_layout[current_user&.local_authority&.subdomain] - if permissions.nil? - permissions = Rails.configuration.use_new_sidebar_layout[:default] - end - if permissions.respond_to?(:include?) - permissions.include?(application_stage) - else - permissions - end - when Array - Rails.configuration.use_new_sidebar_layout.include?(application_stage) - when application_stage - true - else - false - end + Rails.configuration.use_new_sidebar_layout end end diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 0ae7ab9eb7..45b80b8967 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -175,8 +175,7 @@ def document_return_to end def show_sidebar - @show_sidebar = if use_new_sidebar_layout?(:validation) && - !BLOCKED_SIDEBAR_EMAILS.include?(current_user&.email) + @show_sidebar = if use_new_sidebar_layout?(:validation) @planning_application.case_record.tasks.find_by(section: "Validation") end end diff --git a/config/environments/production.rb b/config/environments/production.rb index ba8925c59c..5eefda9853 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -121,12 +121,5 @@ # nb. only used in staging: production will override config.applicants_base_url = "bops-applicants-staging.services" - config.use_new_sidebar_layout = if Bops.env.staging? - { - "camden" => [:assessment], - :default => true - } - else - %i[assessment] - end + config.use_new_sidebar_layout = true end