mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
SECURITY: When enabled only allow Discourse Connect logins
If Discourse Connect is enabled no other methods for account creation or authentication should be allowed.
This commit is contained in:
@ -110,6 +110,9 @@ class Users::OmniauthCallbacksController < ApplicationController
|
||||
end
|
||||
|
||||
def self.find_authenticator(name)
|
||||
if SiteSetting.enable_discourse_connect
|
||||
raise Discourse::InvalidAccess.new(I18n.t("authenticator_not_found"))
|
||||
end
|
||||
Discourse.enabled_authenticators.each do |authenticator|
|
||||
return authenticator if authenticator.name == name
|
||||
end
|
||||
|
Reference in New Issue
Block a user