mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
REFACTOR: Initialize auth providers after plugin.activate!
Also added some helpful functionality for plugin developers: - Raises RuntimeException if the auth provider has been registered too late - Logs use of deprecated parameters
This commit is contained in:
@ -8,11 +8,18 @@ class Auth::AuthProvider
|
||||
def self.auth_attributes
|
||||
[:pretty_name, :title, :message, :frame_width, :frame_height, :authenticator,
|
||||
:pretty_name_setting, :title_setting, :enabled_setting, :full_screen_login, :full_screen_login_setting,
|
||||
:custom_url]
|
||||
:custom_url, :background_color]
|
||||
end
|
||||
|
||||
attr_accessor(*auth_attributes)
|
||||
|
||||
def enabled_setting=(val)
|
||||
Discourse.deprecate("enabled_setting is deprecated. Please define authenticator.enabled? instead")
|
||||
@enabled_setting = val
|
||||
end
|
||||
|
||||
def background_color=(val) Discourse.deprecate("background_color is no longer functional. Please define authenticator.enabled? instead") end;
|
||||
|
||||
def name
|
||||
authenticator.name
|
||||
end
|
||||
|
Reference in New Issue
Block a user