2020-07-06 12:11:04 -04:00
|
|
|
# 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
|
2020-07-15 09:44:40 -04:00
|
|
|
end
|