mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FIX: Prevent all kinds of login in readonly mode (#16743)
This commit is contained in:

committed by
GitHub

parent
7412f665e7
commit
66a04c5cfe
@ -157,6 +157,17 @@ RSpec.describe Users::OmniauthCallbacksController do
|
||||
end
|
||||
end
|
||||
|
||||
context "in readonly mode" do
|
||||
use_redis_snapshotting
|
||||
|
||||
it "should return a 503" do
|
||||
Discourse.enable_readonly_mode
|
||||
|
||||
get "/auth/google_oauth2/callback"
|
||||
expect(response.code).to eq("503")
|
||||
end
|
||||
end
|
||||
|
||||
context "without an `omniauth.auth` env" do
|
||||
it "should return a 404" do
|
||||
get "/auth/eviltrout/callback"
|
||||
|
Reference in New Issue
Block a user