2018-07-31 11:18:50 -04:00
|
|
|
class AuthProviderSerializer < ApplicationSerializer
|
|
|
|
|
|
|
|
attributes :name, :custom_url, :pretty_name_override, :title_override, :message_override,
|
2019-03-27 09:25:04 -04:00
|
|
|
:frame_width, :frame_height, :full_screen_login, :can_connect, :can_revoke,
|
|
|
|
:icon
|
2018-07-31 11:18:50 -04:00
|
|
|
|
|
|
|
def title_override
|
|
|
|
return SiteSetting.send(object.title_setting) if object.title_setting
|
|
|
|
object.title
|
|
|
|
end
|
|
|
|
|
|
|
|
def pretty_name_override
|
|
|
|
return SiteSetting.send(object.pretty_name_setting) if object.pretty_name_setting
|
|
|
|
object.pretty_name
|
|
|
|
end
|
|
|
|
|
|
|
|
def full_screen_login
|
|
|
|
return SiteSetting.send(object.full_screen_login_setting) if object.full_screen_login_setting
|
2018-08-06 05:24:39 -04:00
|
|
|
return object.full_screen_login if object.full_screen_login
|
2018-07-31 11:18:50 -04:00
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def message_override
|
|
|
|
object.message
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|