X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3b56c005ebac1e5aaef8890057767e1955bb4948..88f156a41a5c9ae45d404747819b446861db7a8c:/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..7659e4e11 100644 --- a/app/views/api/users/_user.json.jbuilder +++ b/app/views/api/users/_user.json.jbuilder @@ -4,7 +4,7 @@ json.user do json.account_created user.creation_time.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,7 +45,7 @@ json.user do end end - if current_user && current_user == user + if current_user && current_user == user && can?(:details, User) if user.home_lat && user.home_lon json.home do json.lat user.home_lat @@ -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