Skip to content
Snippets Groups Projects
Unverified Commit a006d4af authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Add registrations attribute to instance entity in REST API (#10060)

Fix #9350
parent 80388a3f
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
attributes :uri, :title, :description, :email,
:version, :urls, :stats, :thumbnail,
:languages
:languages, :registrations
has_one :contact_account, serializer: REST::AccountSerializer
......@@ -51,6 +51,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
[I18n.default_locale]
end
def registrations
Setting.open_registrations && !Rails.configuration.x.single_user_mode
end
private
def instance_presenter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment