Improved signup check.

This commit is contained in:
Martin Edenhofer 2016-06-01 18:48:41 +02:00
parent 9c8339e716
commit 26cd94acab

View file

@ -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