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
This commit is contained in:
@ -13,7 +13,7 @@ class HomeController < ApplicationController
|
||||
private
|
||||
|
||||
def authenticate_user!
|
||||
redirect_to(Rails.configuration.x.single_user_mode ? account_path(Account.first) : about_path) unless user_signed_in?
|
||||
redirect_to(single_user_mode? ? account_path(Account.first) : about_path) unless user_signed_in?
|
||||
end
|
||||
|
||||
def find_or_create_access_token
|
||||
|
Reference in New Issue
Block a user