Merge pull request #13530 from CartoDB/1312-support-org-signup-errors

show signup errors when org-user signup fails
pull/13541/head^2
Alberto Romeu 7 years ago committed by GitHub
commit f0eb9900c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -142,6 +142,7 @@ ion for time-series (#12670)
* Remove Tangram's vector rendering support in Builder embeds ([#13461](https://github.com/CartoDB/cartodb/issues/13461))
* Remove Tangram references (#13461)
* Restore translation keys to static pages (#13492)
* Show signup errors when org-user signup fails [Support#1312](https://github.com/CartoDB/support/issues/1312)
* Fix wrong user quotas [Support#1304](https://github.com/CartoDB/support/issues/1304)
* Fix Embed map disappears when reducing size of screen [Support#1299](https://github.com/CartoDB/support/issues/1299)
* Avoid sending multiple notifications for stuck imports (#11833)

@ -54,6 +54,7 @@ class SignupController < ApplicationController
CartoDB.notify_debug('User not valid at signup', { errors: errors } )
if errors['organization'] && !errors[:organization].empty?
@signup_source = 'Organization'
@signup_errors = errors
render 'shared/signup_issue'
else
if google_signup? && existing_user(@user)
@ -174,6 +175,7 @@ class SignupController < ApplicationController
check_signup_errors = Sequel::Model::Errors.new
@organization.validate_for_signup(check_signup_errors, ::User.new_with_organization(@organization))
@signup_source = 'Organization'
@signup_errors = check_signup_errors
render 'shared/signup_issue' and return false if check_signup_errors.length > 0
end
end

@ -82,7 +82,8 @@ describe SignupController do
Organization.stubs(:where).returns([@fake_organization])
get signup_url
response.status.should == 200
response.body.should match(/Please, contact the administrator of #{@fake_organization.name}/)
response.body.should include("organization not enough seats")
response.body.should include("contact the administrator of #{@fake_organization.name}</a>")
response.body.should match(Regexp.new @fake_organization.owner.email)
end

Loading…
Cancel
Save