Commit aa5327a565c4f528760520031089f2a1a68d7535

Authored by Dmitriy Zaporozhets
1 parent 35139023

Fix project_limit being ignored on signup

Showing 1 changed file with 9 additions and 1 deletions   Show diff stats
app/controllers/registrations_controller.rb
@@ -12,9 +12,17 @@ class RegistrationsController < Devise::RegistrationsController @@ -12,9 +12,17 @@ class RegistrationsController < Devise::RegistrationsController
12 end 12 end
13 end 13 end
14 14
  15 + protected
  16 +
  17 + def build_resource(hash=nil)
  18 + super
  19 + self.resource.projects_limit = Gitlab.config.gitlab.default_projects_limit
  20 + self.resource
  21 + end
  22 +
15 private 23 private
16 24
17 def signup_enabled? 25 def signup_enabled?
18 redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled 26 redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled
19 end 27 end
20 -end  
21 \ No newline at end of file 28 \ No newline at end of file
  29 +end