we have to allow message bus for read clients
This commit is contained in:
parent
9b1e81cd6d
commit
b09922b58a
|
@ -178,7 +178,7 @@ class Auth::DefaultCurrentUserProvider
|
||||||
|
|
||||||
def lookup_user_api_user(user_api_key)
|
def lookup_user_api_user(user_api_key)
|
||||||
if api_key = UserApiKey.where(key: user_api_key, revoked_at: nil).includes(:user).first
|
if api_key = UserApiKey.where(key: user_api_key, revoked_at: nil).includes(:user).first
|
||||||
if !api_key.write && @env["REQUEST_METHOD"] != "GET"
|
if !api_key.write && (@env["REQUEST_METHOD"] != "GET" && @env["PATH_INFO"] !~ /^\/message-bus\/.*\/poll/)
|
||||||
raise Discourse::InvalidAccess
|
raise Discourse::InvalidAccess
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue