X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ffda8d7ac5ca4f40a1211225dd3e1c898fc232a8..be9a501296bcb134ae700319155a636385212b64:/app/controllers/accounts_controller.rb diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 6b47ca666..d45dce66a 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -11,15 +11,13 @@ class AccountsController < ApplicationController before_action :check_database_readable before_action :check_database_writable, :only => [:update] - before_action :allow_thirdparty_images, :only => [:edit, :update] + + allow_thirdparty_images :only => [:edit, :update] + allow_social_login :only => [:edit, :update] def edit @tokens = current_user.oauth_tokens.authorized - append_content_security_policy_directives( - :form_action => %w[accounts.google.com *.facebook.com login.microsoftonline.com github.com meta.wikimedia.org] - ) - if errors = session.delete(:user_errors) errors.each do |attribute, error| current_user.errors.add(attribute, error) @@ -31,10 +29,6 @@ class AccountsController < ApplicationController def update @tokens = current_user.oauth_tokens.authorized - append_content_security_policy_directives( - :form_action => %w[accounts.google.com *.facebook.com login.microsoftonline.com github.com meta.wikimedia.org] - ) - user_params = params.require(:user).permit(:display_name, :new_email, :pass_crypt, :pass_crypt_confirmation, :auth_provider) if params[:user][:auth_provider].blank? ||