From 8ccc3844708cc142c79ea23c59b4aececedf69c5 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 4 Dec 2018 21:03:39 +0100 Subject: [PATCH] use feature flag to enable elasticsearch for dois in production --- app/controllers/dois_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index a98a4107f..a739f90dd 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -9,7 +9,7 @@ class DoisController < ApplicationController def index authorize! :read, Doi - if Rails.env.production? && !current_user.try(:is_admin_or_staff?) + if Rails.env.production? && !Flipper.enabled?(:elasticsearch) # don't use elasticsearch # support nested routes