Files
openfoodnetwork/app/constraints/split_checkout_constraint.rb
Jean-Baptiste Bellet f60068c0ce Use the proxy OpenFoodNetwork::FeatureToggle
that actually call Flipper.enabled?
2022-02-11 11:19:00 +01:00

12 lines
244 B
Ruby

# frozen_string_literal: true
class SplitCheckoutConstraint
def matches?(request)
OpenFoodNetwork::FeatureToggle.enabled? :split_checkout, current_user(request)
end
def current_user(request)
request.env['warden'].user
end
end