mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Fixed all broken specs
Moved middleware config into authenticators
This commit is contained in:
parent
912d4b853b
commit
213ce33af2
20 changed files with 137 additions and 328 deletions
|
@ -35,6 +35,16 @@ module Discourse
|
|||
@plugins
|
||||
end
|
||||
|
||||
def self.authenticators
|
||||
# TODO: perhaps we don't need auth providers and authenticators maybe one object is enough
|
||||
|
||||
# NOTE: this bypasses the site settings and gives a list of everything, we need to register every middleware
|
||||
# for the cases of multisite
|
||||
# In future we may change it so we don't include them all for cases where we are not a multisite, but we would
|
||||
# require a restart after site settings change
|
||||
Users::OmniauthCallbacksController::BUILTIN_AUTH + auth_providers.map(&:authenticator)
|
||||
end
|
||||
|
||||
def self.auth_providers
|
||||
providers = []
|
||||
if plugins
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue