Add a privileged scope that allows email addresses to be returned
This commit is contained in:
parent
6c6e8883f7
commit
f4d1d97848
5 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue