From 26cd94acab6a4890e7b3349352bdd23bb073f9ee Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 1 Jun 2016 18:48:41 +0200 Subject: [PATCH] Improved signup check. --- app/controllers/users_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 76e4a1143..a43f3e39f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -80,7 +80,8 @@ class UsersController < ApplicationController return end - if !params[:signup] + # check signup option only after admin account is created + if count > 2 && !params[:signup] render json: { error_human: 'Only signup is possible!' }, status: :unprocessable_entity return end