From aa5327a565c4f528760520031089f2a1a68d7535 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 18 Mar 2013 13:22:41 +0200 Subject: [PATCH] Fix project_limit being ignored on signup --- app/controllers/registrations_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index b7ee75619..507a5c206 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -12,9 +12,17 @@ class RegistrationsController < Devise::RegistrationsController end end + protected + + def build_resource(hash=nil) + super + self.resource.projects_limit = Gitlab.config.gitlab.default_projects_limit + self.resource + end + private def signup_enabled? redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled end -end \ No newline at end of file +end -- 2.11.0