X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b70da7b8ea15ab48bb2f34155567cea6dffc8fc9..8eb2abc10cff2dd4b23a4d667db9d9db5731c972:/app/views/api/users/_user.xml.builder diff --git a/app/views/api/users/_user.xml.builder b/app/views/api/users/_user.xml.builder index d8c6c1c6e..1791c60ef 100644 --- a/app/views/api/users/_user.xml.builder +++ b/app/views/api/users/_user.xml.builder @@ -1,8 +1,8 @@ xml.tag! "user", :id => user.id, :display_name => user.display_name, - :account_created => user.creation_time.xmlschema do + :account_created => user.created_at.xmlschema do xml.tag! "description", user.description if user.description - if current_user && current_user == user + if current_user && current_user == user && can?(:details, User) xml.tag! "contributor-terms", :agreed => user.terms_agreed.present?, :pd => user.consider_pd else @@ -24,7 +24,7 @@ xml.tag! "user", :id => user.id, :active => user.blocks_created.active.size end end - if current_user && current_user == user + if current_user && current_user == user && can?(:details, User) if user.home_lat && user.home_lon xml.tag! "home", :lat => user.home_lat, :lon => user.home_lon, @@ -40,5 +40,6 @@ xml.tag! "user", :id => user.id, :unread => user.new_messages.size xml.tag! "sent", :count => user.sent_messages.size end + xml.tag! "email", user.email if scope_enabled?(:read_email) end end