Skip to content

Commit

Permalink
Merge pull request #2349 from alphagov/remove-user-research-recruitme…
Browse files Browse the repository at this point in the history
…nt-banner

Add a feature flag (disabled) for the user research banner
  • Loading branch information
chrislo committed Sep 11, 2023
2 parents 6d625fc + d257fc2 commit d1379a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/root_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def privacy_notice; end
private

def show_user_research_recruitment_banner?
!cookies[:dismiss_user_research_recruitment_banner] && !current_user.user_research_recruitment_banner_hidden?
Rails.application.config.show_user_research_recruitment_banner &&
!cookies[:dismiss_user_research_recruitment_banner] &&
!current_user.user_research_recruitment_banner_hidden?
end
helper_method :show_user_research_recruitment_banner?
end
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,7 @@ class Application < Rails::Application

cookies.rotate :encrypted, secret
end

config.show_user_research_recruitment_banner = false
end
end
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@

config.logger = Logger.new($stdout)
config.log_level = :fatal

config.show_user_research_recruitment_banner = true
end

0 comments on commit d1379a1

Please sign in to comment.