summaryrefslogtreecommitdiff
path: root/app/controllers/registrations_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-18 13:22:41 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-18 13:22:41 +0200
commitaa5327a565c4f528760520031089f2a1a68d7535 (patch)
treec8fa463440e3ffb7972569542b5fe46dcd08a267 /app/controllers/registrations_controller.rb
parent351390239673923d71610ba320b2bf163ab6f9a9 (diff)
downloadgitlab-ce-aa5327a565c4f528760520031089f2a1a68d7535.tar.gz
Fix project_limit being ignored on signup
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index b7ee75619cb..507a5c206c6 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