DEV: Deprecate message parameter in auth provider plugin API (#12523)

This has been unused since d2bceff133
This commit is contained in:
David Taylor 2021-03-25 13:23:48 +00:00 committed by GitHub
parent edcb5f77da
commit f637bf1b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 16 deletions

View File

@ -18,11 +18,6 @@ const LoginMethod = EmberObject.extend({
return this.pretty_name_override || I18n.t(`login.${this.name}.name`);
},
@discourseComputed
message() {
return this.message_override || I18n.t(`login.${this.name}.message`);
},
doLogin({ reconnect = false, signup = false, params = {} } = {}) {
if (this.customLogin) {
this.customLogin();

View File

@ -576,7 +576,6 @@ export default {
custom_url: null,
pretty_name_override: null,
title_override: null,
message_override: null,
frame_width: 580,
frame_height: 400,
can_connect: true,

View File

@ -2,7 +2,7 @@
class AuthProviderSerializer < ApplicationSerializer
attributes :name, :custom_url, :pretty_name_override, :title_override, :message_override,
attributes :name, :custom_url, :pretty_name_override, :title_override,
:frame_width, :frame_height, :can_connect, :can_revoke,
:icon
@ -16,8 +16,4 @@ class AuthProviderSerializer < ApplicationSerializer
object.pretty_name
end
def message_override
object.message
end
end

View File

@ -8,7 +8,7 @@ class Auth::AuthProvider
end
def self.auth_attributes
[:pretty_name, :title, :message, :frame_width, :frame_height, :authenticator,
[:authenticator, :pretty_name, :title, :message, :frame_width, :frame_height,
:pretty_name_setting, :title_setting, :enabled_setting, :full_screen_login, :full_screen_login_setting,
:custom_url, :background_color, :icon]
end
@ -32,6 +32,10 @@ class Auth::AuthProvider
Discourse.deprecate("(#{authenticator.name}) full_screen_login is now forced. The full_screen_login_setting parameter can be removed from the auth_provider.")
end
def message=(val)
Discourse.deprecate("(#{authenticator.name}) message is no longer used because all logins are full screen. It should be removed from the auth_provider")
end
def name
authenticator.name
end

View File

@ -6,10 +6,7 @@
# authors: Frank Zappa
auth_provider title: 'with Ubuntu',
authenticator: Auth::FacebookAuthenticator.new,
message: 'Authenticating with Ubuntu (make sure pop up blockers are not enbaled)',
frame_width: 1000, # the frame size used for the pop up window, overrides default
frame_height: 800
authenticator: Auth::FacebookAuthenticator.new
register_javascript <<JS
console.log("Hello world")