diff options
author | ThibG <thib@sitedethib.com> | 2019-03-14 22:11:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 22:11:56 +0100 |
commit | c2fa0f7c40bcc4064e8baaa221665eadd391c001 (patch) | |
tree | 74a5e58f2c724746d2e929b9df0e5682f17a2637 /app/controllers/api/v1 | |
parent | fa75324059c7a146354470691888dc0e1de0342f (diff) | |
parent | 09ac5e7528ba3bfe90c20002f47c863d9afc6fcd (diff) |
Merge pull request #960 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 2ccbc3cbb..b0c62778e 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -80,6 +80,10 @@ class Api::V1::AccountsController < Api::BaseController end def check_enabled_registrations - forbidden if single_user_mode? || !Setting.open_registrations + forbidden if single_user_mode? || !allowed_registrations? + end + + def allowed_registrations? + Setting.registrations_mode != 'none' end end |