X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c1c459734d96736d1f4a5a14ec2570bcfd2cf83d..a1798fe6fb238fd2e4b878cd1736ca2b3101daa7:/app/views/api/users/_user.json.jbuilder diff --git a/app/views/api/users/_user.json.jbuilder b/app/views/api/users/_user.json.jbuilder index d89b42bef..b84916010 100644 --- a/app/views/api/users/_user.json.jbuilder +++ b/app/views/api/users/_user.json.jbuilder @@ -1,10 +1,10 @@ json.user do json.id user.id json.display_name user.display_name - json.account_created user.creation_time.xmlschema + json.account_created user.created_at.xmlschema json.description user.description if user.description - if current_user && current_user == user + if current_user && current_user == user && can?(:details, User) json.contributor_terms do json.agreed user.terms_agreed.present? json.pd user.consider_pd @@ -45,8 +45,8 @@ json.user do end end - if current_user && current_user == user - if user.home_lat && user.home_lon + if current_user && current_user == user && can?(:details, User) + if user.has_home? json.home do json.lat user.home_lat json.lon user.home_lon @@ -65,5 +65,7 @@ json.user do json.count user.sent_messages.size end end + + json.email user.email if scope_enabled?(:read_email) end end