Don't report the PD flag in the user API call

This commit is contained in:
Tom Hughes 2012-09-24 18:43:30 +01:00
parent 8857fe3624
commit f47edb1446
2 changed files with 7 additions and 3 deletions

View file

@ -6,9 +6,12 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
if @this_user.description
xml.tag! "description", @this_user.description
end
xml.tag! "contributor-terms",
:agreed => !!@this_user.terms_agreed,
:pd => !!@this_user.consider_pd
if @user && @user == @this_user
xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed,
:pd => !!@this_user.consider_pd
else
xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed
end
if @this_user.image.file?
xml.tag! "img", :href => "http://#{SERVER_URL}#{@this_user.image.url}"
end

View file

@ -531,6 +531,7 @@ class UserControllerTest < ActionController::TestCase
assert_response :success
# check that we aren't revealing private information
assert_select "contributor-terms[pd]", false
assert_select "home", false
assert_select "languages", false