mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 08:43:25 +08: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`);
|
||||
},
|
||||
|
||||
@discourseComputed
|
||||
message() {
|
||||
return this.message_override || I18n.t(`login.${this.name}.message`);
|
||||
},
|
||||
|
||||
doLogin({ reconnect = false, signup = false, params = {} } = {}) {
|
||||
if (this.customLogin) {
|
||||
this.customLogin();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
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
|
||||
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user