summaryrefslogtreecommitdiff
path: root/app/controllers/registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
new file mode 100644
index 00000000000..cbac7613e59
--- /dev/null
+++ b/app/controllers/registrations_controller.rb
@@ -0,0 +1,9 @@
+class RegistrationsController < Devise::RegistrationsController
+ before_filter :signup_enabled?
+
+ private
+
+ def signup_enabled?
+ redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled
+ end
+end \ No newline at end of file