Fix project_limit being ignored on signup
This commit is contained in:
parent
3513902396
commit
aa5327a565
1 changed files with 9 additions and 1 deletions
|
@ -12,9 +12,17 @@ class RegistrationsController < Devise::RegistrationsController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def build_resource(hash=nil)
|
||||||
|
super
|
||||||
|
self.resource.projects_limit = Gitlab.config.gitlab.default_projects_limit
|
||||||
|
self.resource
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue