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

Add `openRegistrations` attribute to nodeinfo endpoint (#12058)

parent 575dc11c
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
class NodeInfo::Serializer < ActiveModel::Serializer
include RoutingHelper
attributes :version, :software, :protocols, :usage
attributes :version, :software, :protocols, :usage, :open_registrations
def version
'2.0'
......@@ -33,6 +33,10 @@ class NodeInfo::Serializer < ActiveModel::Serializer
}
end
def open_registrations
Setting.registrations_mode != 'none' && !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