Commit 60cc1d8e authored by Marin Jankovski's avatar Marin Jankovski

Override strong params for sign up.

parent 108be8a6
...@@ -247,7 +247,6 @@ class ApplicationController < ActionController::Base ...@@ -247,7 +247,6 @@ class ApplicationController < ActionController::Base
def configure_permitted_parameters def configure_permitted_parameters
devise_parameter_sanitizer.sanitize(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me) } devise_parameter_sanitizer.sanitize(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me) }
devise_parameter_sanitizer.sanitize(:sign_up) { |u| u.permit(:username, :email, :name, :password, :password_confirmation) }
end end
def hexdigest(string) def hexdigest(string)
......
...@@ -28,4 +28,8 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -28,4 +28,8 @@ class RegistrationsController < Devise::RegistrationsController
def signup_enabled? def signup_enabled?
redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled
end end
def sign_up_params
params.require(:user).permit(:username, :email, :name, :password, :password_confirmation)
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment