mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 15:31:35 +08:00
10 lines
254 B
Ruby
10 lines
254 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
|