mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 07:12:46 +00:00
10 lines
253 B
Ruby
10 lines
253 B
Ruby
|
# 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
|