mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: Add API scope for /logs route (#24956)
Adds an API scope for accessing Logster's routes. This one is a bit different than routes from core because it is mounted like ``` mount Logster::Web => "/logs" ``` and doesn't have all the route info a traditional rails app/engine does.
This commit is contained in:
@ -440,6 +440,7 @@ RSpec.describe Admin::ApiController do
|
||||
"search",
|
||||
"invites",
|
||||
"wordpress",
|
||||
"logs",
|
||||
)
|
||||
|
||||
topic_routes = [
|
||||
@ -479,6 +480,10 @@ RSpec.describe Admin::ApiController do
|
||||
"/u/:username/feature-topic (PUT)",
|
||||
"/u/:username/clear-featured-topic (PUT)",
|
||||
)
|
||||
|
||||
expect(
|
||||
scopes["logs"].any? { |h| h["urls"].include?("/logs/messages.json (POST)") },
|
||||
).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user