Add `enabled?` function to authenticator
This commit is contained in:
parent
34c34d462e
commit
3ce35cb7dd
|
@ -144,6 +144,10 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
|
||||||
def after_create_account(user, auth)
|
def after_create_account(user, auth)
|
||||||
::PluginStore.set("oauth2_basic", "oauth2_basic_user_#{auth[:extra_data][:oauth2_basic_user_id]}", user_id: user.id)
|
::PluginStore.set("oauth2_basic", "oauth2_basic_user_#{auth[:extra_data][:oauth2_basic_user_id]}", user_id: user.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def enabled?
|
||||||
|
SiteSetting.oauth2_enabled
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
auth_provider title_setting: "oauth2_button_title",
|
auth_provider title_setting: "oauth2_button_title",
|
||||||
|
|
Loading…
Reference in New Issue