From 140155f32a9bd8ef2d5a581a1e56701a44a8f5a7 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 10 Jul 2014 17:58:32 +0200 Subject: Added allow_registration toggle. - default is true - See issue #5217 - See companion change in leap_platform. --- app/controllers/users_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/users_controller.rb') diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5951413..a623653 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -26,7 +26,11 @@ class UsersController < UsersBaseController end def new - @user = User.new + if APP_CONFIG[:allow_registration] + @user = User.new + else + redirect_to home_path + end end def show -- cgit v1.2.3