Merge branch 'feat/expose_email_to_self' into 'develop'
Expose user email address to user/owner; not publicly. See merge request pleroma/pleroma!3412
This commit is contained in:
commit
f34e22bba2
3 changed files with 29 additions and 0 deletions
|
|
@ -468,6 +468,23 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
%{user: user, for: user}
|
||||
)[:pleroma][:unread_notifications_count] == 7
|
||||
end
|
||||
|
||||
test "shows email only to the account owner" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user)
|
||||
|
||||
user = User.get_cached_by_ap_id(user.ap_id)
|
||||
|
||||
assert AccountView.render(
|
||||
"show.json",
|
||||
%{user: user, for: other_user}
|
||||
)[:pleroma][:email] == nil
|
||||
|
||||
assert AccountView.render(
|
||||
"show.json",
|
||||
%{user: user, for: user}
|
||||
)[:pleroma][:email] == user.email
|
||||
end
|
||||
end
|
||||
|
||||
describe "follow requests counter" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue