Don't report the PD flag in the user API call
This commit is contained in:
parent
8857fe3624
commit
f47edb1446
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue