1
0
mirror of synced 2026-08-04 06:06:55 +00:00
Files

11 lines
254 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
class SubscriptionsUserConstraint
def matches?(request)
provider = Discourse.current_user_provider.new(request.env)
provider.current_user
rescue Discourse::InvalidAccess, Discourse::ReadOnly
false
end
end