0
0
Fork 0

Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `spec/models/status_spec.rb`:
  Upstream added tests too close to glitch-soc-specific tests.
  Kept both tests.
This commit is contained in:
Claire 2022-01-23 18:13:55 +01:00
commit 61ef81c548
31 changed files with 295 additions and 217 deletions

View file

@ -83,10 +83,14 @@ class Api::V1::AccountsController < Api::BaseController
end
def check_enabled_registrations
forbidden if single_user_mode? || !allowed_registrations?
forbidden if single_user_mode? || omniauth_only? || !allowed_registrations?
end
def allowed_registrations?
Setting.registrations_mode != 'none'
end
def omniauth_only?
ENV['OMNIAUTH_ONLY'] == 'true'
end
end