mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
12 lines
245 B
Ruby
12 lines
245 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SplitCheckoutConstraint
|
|
def matches?(request)
|
|
Flipper.enabled? :split_checkout, current_user(request)
|
|
end
|
|
|
|
def current_user(request)
|
|
@spree_current_user ||= request.env['warden'].user
|
|
end
|
|
end
|