diff options
author | Marcin Cieślak <saper@saper.info> | 2017-04-15 16:46:27 +0200 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-15 16:46:27 +0200 |
commit | 1c8477eab214629d26d9526b386bf75729917060 (patch) | |
tree | a937c60129fa9ee947c3af7b136a903bd4555c76 /app/controllers/auth | |
parent | 6670e6d33fa735b6199e3b962f62ed6d1442bae1 (diff) |
Give SINGLE_USER a chance to register (#1820)
An attempt to open a brand new Mastodon instance configured as SINGLE_USER_MODE=true will cause an exception. Enable temporary registration if we have no users in the database Fixes #1817
Diffstat (limited to 'app/controllers/auth')
-rw-r--r-- | app/controllers/auth/registrations_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index 4881c074a..f8050afb5 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -28,7 +28,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController end def check_enabled_registrations - redirect_to root_path if Rails.configuration.x.single_user_mode || !Setting.open_registrations + redirect_to root_path if single_user_mode? || !Setting.open_registrations end private |