X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4965c19b7a8c96ab87b543af1fc36a1ad7514c09..12ac6f8f27dfe63d9674fba54862db13a9e6d89a:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c3c4dcfb3..2cdec642d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -63,7 +63,7 @@ class UsersController < ApplicationController parse_oauth_referer @referer append_content_security_policy_directives( - :form_action => %w[accounts.google.com *.facebook.com login.live.com github.com meta.wikimedia.org] + :form_action => %w[accounts.google.com *.facebook.com login.microsoftonline.com github.com meta.wikimedia.org] ) if current_user @@ -78,10 +78,11 @@ class UsersController < ApplicationController :auth_provider => params[:auth_provider], :auth_uid => params[:auth_uid]) - flash.now[:notice] = render_to_string :partial => "auth_association" - - # validate before displaying to show email field if it conflicts - flash.now[:notice] = t ".duplicate_social_email" unless current_user.valid? && current_user.errors[:email].empty? + if current_user.valid? || current_user.errors[:email].empty? + flash.now[:notice] = render_to_string :partial => "auth_association" + else + flash.now[:warning] = t ".duplicate_social_email" + end else check_signup_allowed