mirror of
https://github.com/discourse/discourse.git
synced 2025-04-23 15:04:23 +08:00

A number of attributes on AuthProvider are deprecated for and were marked for removal in 2.9.0. This PR removes them.
38 lines
605 B
Ruby
38 lines
605 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Auth::AuthProvider
|
|
include ActiveModel::Serialization
|
|
|
|
def initialize(params = {})
|
|
params.each { |key, value| public_send "#{key}=", value }
|
|
end
|
|
|
|
def self.auth_attributes
|
|
%i[
|
|
authenticator
|
|
pretty_name
|
|
title
|
|
frame_width
|
|
frame_height
|
|
pretty_name_setting
|
|
title_setting
|
|
custom_url
|
|
icon
|
|
]
|
|
end
|
|
|
|
attr_accessor(*auth_attributes)
|
|
|
|
def name
|
|
authenticator.name
|
|
end
|
|
|
|
def can_connect
|
|
authenticator.can_connect_existing_user?
|
|
end
|
|
|
|
def can_revoke
|
|
authenticator.can_revoke?
|
|
end
|
|
end
|