diff options
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r-- | app/controllers/registrations_controller.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 6d3214b70a8..38d116a4ee3 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -1,6 +1,10 @@ class RegistrationsController < Devise::RegistrationsController before_filter :signup_enabled? + def new + redirect_to(new_user_session_path) + end + def destroy current_user.destroy @@ -15,18 +19,20 @@ class RegistrationsController < Devise::RegistrationsController super end - def after_sign_up_path_for(resource) + def after_sign_up_path_for(_resource) new_user_session_path end - def after_inactive_sign_up_path_for(resource) + def after_inactive_sign_up_path_for(_resource) new_user_session_path end private def signup_enabled? - redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled + unless current_application_settings.signup_enabled? + redirect_to(new_user_session_path) + end end def sign_up_params |