Skip to content
Snippets Groups Projects
Unverified Commit b40d68cc authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Add `invites_enabled` to API (#13501)

parent 15785057
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, :short_description, :description, :email,
:version, :urls, :stats, :thumbnail,
:languages, :registrations, :approval_required
:languages, :registrations, :approval_required, :invites_enabled
has_one :contact_account, serializer: REST::AccountSerializer
......@@ -63,6 +63,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
Setting.registrations_mode == 'approved'
end
def invites_enabled
Setting.min_invite_role == 'user'
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