mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
12 lines
244 B
Ruby
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
|