X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5a66dbf907fb64921f55e02ef649b350486e7bf0..4ac48d2cb5cd2197d8f2702bdc7b17072b2fdc85:/app/controllers/user_controller.rb?ds=sidebyside diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 3f6e4e3b7..0042be316 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -1,9 +1,11 @@ class UserController < ApplicationController layout 'site' - before_filter :authorize, :only => [:preferences, :api_details, :api_gpx_files] + before_filter :authorize, :only => [:api_details, :api_gpx_files] before_filter :authorize_web, :only => [:account, :go_public, :view, :diary, :make_friend] - before_filter :require_user, :only => [:set_home, :account, :go_public, :make_friend, :api_details] + before_filter :require_user, :only => [:set_home, :account, :go_public, :make_friend] + + filter_parameter_logging :password, :pass_crypt, :pass_crypt_confirmation def save @title = 'create account' @@ -156,21 +158,8 @@ class UserController < ApplicationController end end - def preferences - @title = 'preferences' - if request.get? - render_text @user.preferences - elsif request.post? or request.put? - @user.preferences = request.raw_post - @user.save! - render :nothing => true - else - render :nothing => true, :status => :method_not_allowed - end - end - def api_details - render :text => @user.to_xml.to_s + render :text => @user.to_xml.to_s, :content_type => "text/xml" end def api_gpx_files @@ -178,7 +167,7 @@ class UserController < ApplicationController @user.traces.each do |trace| doc.root << trace.to_xml_node() if trace.public? or trace.user == @user end - render :text => doc.to_s + render :text => doc.to_s, :content_type => "text/xml" end def view