Fix project_limit being ignored on signup

5-0-stable
Dmitriy Zaporozhets 2013-03-18 13:22:41 +02:00
parent 3513902396
commit aa5327a565
1 changed files with 9 additions and 1 deletions

View File

@ -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
end