mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Deprecate message
parameter in auth provider plugin API (#12523)
This has been unused since d2bceff133
This commit is contained in:
parent
edcb5f77da
commit
f637bf1b58
@ -18,11 +18,6 @@ const LoginMethod = EmberObject.extend({
|
|||||||
return this.pretty_name_override || I18n.t(`login.${this.name}.name`);
|
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 = {} } = {}) {
|
doLogin({ reconnect = false, signup = false, params = {} } = {}) {
|
||||||
if (this.customLogin) {
|
if (this.customLogin) {
|
||||||
this.customLogin();
|
this.customLogin();
|
||||||
|
@ -576,7 +576,6 @@ export default {
|
|||||||
custom_url: null,
|
custom_url: null,
|
||||||
pretty_name_override: null,
|
pretty_name_override: null,
|
||||||
title_override: null,
|
title_override: null,
|
||||||
message_override: null,
|
|
||||||
frame_width: 580,
|
frame_width: 580,
|
||||||
frame_height: 400,
|
frame_height: 400,
|
||||||
can_connect: true,
|
can_connect: true,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class AuthProviderSerializer < ApplicationSerializer
|
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,
|
:frame_width, :frame_height, :can_connect, :can_revoke,
|
||||||
:icon
|
:icon
|
||||||
|
|
||||||
@ -16,8 +16,4 @@ class AuthProviderSerializer < ApplicationSerializer
|
|||||||
object.pretty_name
|
object.pretty_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def message_override
|
|
||||||
object.message
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@ class Auth::AuthProvider
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.auth_attributes
|
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,
|
:pretty_name_setting, :title_setting, :enabled_setting, :full_screen_login, :full_screen_login_setting,
|
||||||
:custom_url, :background_color, :icon]
|
:custom_url, :background_color, :icon]
|
||||||
end
|
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.")
|
Discourse.deprecate("(#{authenticator.name}) full_screen_login is now forced. The full_screen_login_setting parameter can be removed from the auth_provider.")
|
||||||
end
|
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
|
def name
|
||||||
authenticator.name
|
authenticator.name
|
||||||
end
|
end
|
||||||
|
5
spec/fixtures/plugins/my_plugin/plugin.rb
vendored
5
spec/fixtures/plugins/my_plugin/plugin.rb
vendored
@ -6,10 +6,7 @@
|
|||||||
# authors: Frank Zappa
|
# authors: Frank Zappa
|
||||||
|
|
||||||
auth_provider title: 'with Ubuntu',
|
auth_provider title: 'with Ubuntu',
|
||||||
authenticator: Auth::FacebookAuthenticator.new,
|
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
|
|
||||||
|
|
||||||
register_javascript <<JS
|
register_javascript <<JS
|
||||||
console.log("Hello world")
|
console.log("Hello world")
|
||||||
|
Loading…
Reference in New Issue
Block a user