summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2014-07-10 17:58:32 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2014-07-11 10:44:21 +0200
commit140155f32a9bd8ef2d5a581a1e56701a44a8f5a7 (patch)
tree858f22fd9167b490b8b3fcaed2884215d0f0018a /app/controllers/users_controller.rb
parentc9dd5a342f902b27aec73af24776025a03feda48 (diff)
Added allow_registration toggle.
- default is true - See issue #5217 - See companion change in leap_platform.
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb6
1 files changed, 5 insertions, 1 deletions
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