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