|
@ -3,7 +3,7 @@ |
|
|
class NodeInfo::Serializer < ActiveModel::Serializer |
|
|
class NodeInfo::Serializer < ActiveModel::Serializer |
|
|
include RoutingHelper |
|
|
include RoutingHelper |
|
|
|
|
|
|
|
|
attributes :version, :software, :protocols, :usage |
|
|
|
|
|
|
|
|
attributes :version, :software, :protocols, :usage, :open_registrations |
|
|
|
|
|
|
|
|
def version |
|
|
def version |
|
|
'2.0' |
|
|
'2.0' |
|
@ -33,6 +33,10 @@ class NodeInfo::Serializer < ActiveModel::Serializer |
|
|
} |
|
|
} |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def open_registrations |
|
|
|
|
|
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
private |
|
|
private |
|
|
|
|
|
|
|
|
def instance_presenter |
|
|
def instance_presenter |
|
|